25 views

Uploaded by dhinojahimesh

hi

- Units 12389bk
- Important Shortcut Tips to Solve Numerical Problems
- Data Lab
- Addition and Subtraction of Binary Numbers Akash
- 06
- 8 - Digital Operations
- 3rd Grade Map 2011-12
- Implementation of Half Subtractor and Full Subtractor based on CNTFET
- Brent Kung Prefix Adder
- De Lab Manual
- lab2_Verilog
- 341-12-5-2001
- Digital Electronics Lab
- Circuit Design
- Design of a Novel Multiplier and Accumulator using Modified Booth Algorithm with Parallel Self-Time Adder
- Test2 Report Final
- Vlsi Implementation
- Elimination of Arbitrary Constants
- Smart TV Report
- 4_tanksinseries

You are on page 1of 9

Task 1) Design two versions (Version A and Version B below) of the combinational circuit whose input is a 4-bit number and whose output is the 2’s complement of the input number: Version A) The circuit is a simplified two-level circuit, plus inverters as needed for the input variables. We first set up the truth table for conversion to 2’s complement so that we can minimize the functions for each output with K-maps (we have 4 outputs in total). To find the 2’s complement of a binary number N, just flip the bits of N and add 1 (you should know this from lecture 1).

A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Input 4-bit number B C 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2’s complement of the input number S1 S2 S3 S4 0 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1

**Now we can minimize the functions S1, S2, S3, and S4. Each output bit Si has its own K-map: S1)
**

CD AB

1 1 1 C

1

1

1

1 B

A 1

D

S1 = A’B + A’C + A’D + AB’C’D’ S2) CD AB 1 1 C 1 1 B 1 A 1 1 1 D S2 = B’C + B’D + BC’D’ S3) AB CD C 1 1 1 1 A 1 1 1 B 1 1 D (notice that this is the exclusive or between C and D) S3 = C’D + D’C = C xor D .

A B C D S1 S2 S3 S4 .S4) CD AB 1 1 1 1 1 A 1 1 1 1 C B 1 D S4 = D Now. we have all minimized functions and we can draw our circuit.

Ci+1. We want the rightmost carry to be 0 and to remove the inverters. Ai Ai-1 HA HA Ci+1 Bi HA Ci Bi-1 HA 1 Si Si-1 We can show that Si is Ai xor Bi’. Since. Let us take the third block and make the Boolean equations for the 2 outputs Si. So. This makes our work a lot easier. . The cells are connected in cascade. twooutput cells. we complemented Bi we can use 0 instead of 1 in the right most carry (all blocks are identical). we have to modify this circuit. one for each bit. with lines similar to a carry between them. Here’s an almost identical solution that uses 4 half adders and a rightmost carry of 1 (see the lectures). The value applied to the rightmost carry bit is 0. Si = Ai’ xor Bi = Ai’Bi’ + AiBi = (See Lecture 5 for half adders) = Ai Bi + Ai’Bi’ = Ai xor Bi’ If we want to use Bi’ then we have to use (Ci)’ from the previous block and to generate (Ci+1)’ for the next block Ci+1 = Ai’ Bi (Ci+1)’ = (Ai’ Bi)’ = Ai + Bi’ Now we have the needed Boolean equations to make our circuit.Version B) The circuit is made up of four identical two-input.

The only difference with a half adder is the OR gate (a half adder uses an AND gate) Ai Bi’ (Ci+1)’ Si . we draw the circuit that is inside of one of the blocks (all blocks are identical).Ai (Ci+1)’ Bi’ 0 Si Below.

and (3) selective 2’s complement result correction logic. A3 A4 A2 A1 A0 B4 B3 B2 B1 B0 A4 B4 Cout S 1 OP Sign C4 Sub/Add 4 bit add/ subtract 2 S3 S2 S1 S0 Selective 2's Complementer Correct 3 R4 R3 R2 R1 R0 . Divide the circuit for design into: (1) sign generation and add/subtract control logic. (1) add/subtract control logic. (2) an unsigned number adder-subtractor using 2’s complement of the minuend for subtraction.Task 2) Design a 5-bit signed magnitude adder-subtractor (1 bit for the sign and 4 bits for the magnitude). Let us examine the individual parts more closely. (2) an unsigned adder-subtractor and (3) a selective 2’s complement result correction logic. Here is the circuit divided in three parts.

A4 and B4 are the sign bits of the signed numbers.. Let us set up a truth table for this purpose. B>A. +(A-B) (+A) + (-B). A>B. B>A. B>A. A>B... S = 0 is addition). A4 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 B4 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 S 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 Cout 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 OP 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 Sign 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 meaning (+A) + (+B). you get the point . After we have checked the signs and carry we can determine the final sign (R4) for the addition/subtraction.. +(A+B) (-A) + (+B). OP is the signal that determines the real operation (add or subtract) depending on the signs A4 and B4 as well as from the input S. +(A+B) (+A) . -(A-B) . you get the point K-Map for OP S OP 1 1 1 1 B4 1 1 A4 1 1 Cout OP = A4 B4’ S’ + A4 B4 S + A’ B4 S’ + A4’ B4’ S = A4 xor B4 xor S . you get the point . The outputs are OP and Sign. -(A-B) (+A) + (-B).(-B). -(A-B) (+A) – (+B). B>A. the rest is all input. +(A-B) (-A) + (+B). you get the point . A>B. +(A-B) (+A) .(-B).Circuit 1) S is the operation we want to do (S = 1 is subtraction. you get the point .. +(A+B) overflow (+A) – (+B). Cout is the carry out from circuit (2).. you get the point . B>A.

K-Map for Sign S Sign 1 1 B4 1 A4 1 1 111 1 1 1 1 Cout Sign = A4 Cout + B4 S’ Cout’ + B4’ S Cout’ = A4 Cout + Cout’ (B4 xor S) Now we can draw the circuit. A4 OP B4 S Cout Sign .

(See the truth table for (1) if you want to know why) so we use the correct line which is 1 if the carry is zero and a subtract operation is used.Circuit 2) See Lecture 5 for the circuit of unsigned 2’s complement AdderSubtractor. else it does nothing and the output equals the input. We only want to take the 2’s complement when needed. Circuit 3) Selective 2’s complementer. If correct is 1 it complements and adds 1 to the input. S3 S2 S1 S0 Correct HA HA HA HA R3 R2 R1 R0 .

- Units 12389bkUploaded byOdinga Logie
- Important Shortcut Tips to Solve Numerical ProblemsUploaded byJyothyDas
- Data LabUploaded byAnonymous Kmmc9r
- Addition and Subtraction of Binary Numbers AkashUploaded byAkash
- 06Uploaded byArun Kumar
- 8 - Digital OperationsUploaded byMichele Bacocchia
- 3rd Grade Map 2011-12Uploaded byjsis2014
- Implementation of Half Subtractor and Full Subtractor based on CNTFETUploaded byIRJET Journal
- Brent Kung Prefix AdderUploaded bySanary Rebels
- De Lab ManualUploaded byarunkumar
- lab2_VerilogUploaded byHải Trần
- 341-12-5-2001Uploaded byM Madan Gopal
- Digital Electronics LabUploaded bySujeesh Soman
- Circuit DesignUploaded byHafiezul Hassan
- Design of a Novel Multiplier and Accumulator using Modified Booth Algorithm with Parallel Self-Time AdderUploaded byIRJET Journal
- Test2 Report FinalUploaded byAsim Ahmed
- Vlsi ImplementationUploaded byManoj Kumar
- Elimination of Arbitrary ConstantsUploaded byElaine Bicol

- Smart TV ReportUploaded bydhinojahimesh
- 4_tanksinseriesUploaded bytresmilhoes
- Handout2Uploaded bydhinojahimesh
- Assignment CTUploaded bydhinojahimesh
- Tutorial. 4 CONTROL DESIGNUploaded bySteve Goke Ayeni
- Lpw Circuit Theory 2013Uploaded bydhinojahimesh
- ActuatorsUploaded bydhinojahimesh
- OscillatorsUploaded byPriyanka Gaur
- OscillatorsUploaded byPriyanka Gaur
- SyllabusUploaded bydhinojahimesh
- SG310EarnestUploaded bymaryannie82
- chap3Uploaded bydhinojahimesh
- Colpitts OscillatorUploaded byBharat Swabhiman
- 04-MintermsMaxtermsUploaded byEng Mohamed Shahin

- Quiz2 RealUploaded byIrfan Fazail
- Key Based Least Significant Bit _lsb_ Insertion for Audio and Video SteganographyUploaded byprjpublications
- Avionics Software Testing Cp 11Uploaded byMani Shankar Prasad
- Condor InstructionUploaded byrampdwn
- Review Sparse ArxivUploaded byAugustoZebadúa
- C++ Data TypesUploaded byPaul Tanasescu
- DBMSUploaded byNilesh Patel
- Ziegler-Nichols Controller Tuning ExampleUploaded byChristine Avdikou
- OBJECT-ORIENTED ANALYSIS OF VERY HIGH RESOLUTION ORTHOPHOTOS FOR ESTIMATING THE POPULATION OF SLUM AREAS, CASE OF DAR-ES-SALAAM, TANZANIA.pdfUploaded byDavid Olamendi Colin
- Coffee Bean Technology Social CRM Use Cases for Mid Size BusinessUploaded byGraham Holt
- Has SanUploaded byfeedbactoali1284
- Oracle Database 11g SQL Tuning Workshop.pdfUploaded byjuanarru
- The-JHipster-Mini-book-2.pdfUploaded byAmil P. Tan II
- Android OpenGL 2.0.pdfUploaded bydalaran34
- Quartz ComposerUploaded byapi-26084987
- Rman Recovery StepsUploaded byongback
- 91 3 STOIKOV Microstructure TalkUploaded byAntonello Camiletti
- computerarchimp-100726095806-phpapp02Uploaded byKarthik Vijay
- Online Databases at IPE Library (2)Uploaded byukpga
- LispUploaded byAjit More
- Final Sem 1 PLSQLUploaded byIoana Toader
- eSkwela Progress Report - Jan 2006 - Jan 2007 - AEFUploaded bymameltan
- Doctrine ORM for PHPUploaded bypvalenzuelacarcamo
- Graphic Design Basics Tutorial - FireworksUploaded bymrblaze2000
- CENTOS 6 Getting Started With SuricataUploaded bymingsetao
- PM6 - CO10 - EC Project Phase.pdfUploaded byCarlos Ivan Estevez
- Bioinforamtics One LinersUploaded byRavi Upanishad
- 51784878-Leo-Burnett-case.docUploaded byvinuthamsr
- Effect of Specific Exercise-based Football InjuryUploaded bySuzanne Hui Ying Lau
- 35949705 Electrical CalculationsUploaded bysesabcd