2. Verity 4-bit Substrator using 2\'s complement (lake each bil logic NOT, afer
ID: 3348712 • Letter: 2
Question
2. Verity 4-bit Substrator using 2's complement (lake each bil logic NOT, afer thai, whole number add 1) with sigsed n Mned mumbers are represented as follons: The MSB is the sign bit If the MSB O, the umber is positive. If tlve MSB - 1, the nawber is egative and stored in 2's complement form Fer Example: Repn ah unr belayw using &-bilts in eary umben, where the MISB s the sgn bt a) 12- 2 b)-12-32 d)-32- P'erform various suberactions and additions using pairs of the mumbers in the example above and verify that the resalts are correct by coeverting binary number first and taking 2's complensent a) 12+(-32) e) -12-(32) b)32 (-12)-7 -32-612)- We have seen that subtraction can be performed using 2's complement addition. The add shown below can perform either addition or subtraction lasing 2's complement addition) as follows: er-subracsor circuit s-o) Irs-0,then X3-B3,so the adder circuit simply adds A and B with Co-s- (nut carry Subtraction: (S-)IrS-1, then X1-B3, so the adder -1). Since B' is the 1's complement of E 2's complement of B or subtracting B from A. circuit simply adds A and B' with CO-s-1 (input carry is the I's complement of B, adding the 1's complement 1 (inpot) carry is equivalemt to adding the Please give inputs as follows, then calculate by above circuit in binary number a)7+(-3)-4 3. Verify 2-bit Multiplier Multiplication of two numbers is carried out by a process of muhiplying all combinations of the and adding them up in the appropr individual products 43, 41,23 and 2xl, and adding them raised to the appropriate power of 10 to form: 4 102+4 3 101+21 101 x23. This is the way that long multiplication is normally carried out. We can apply the same principal to binary arihmsetic. In the simplest case let us consider multiplying two digit numbers ate positions. For example, we can multiply 13 by 42 by taking the four Now, since Al, A0, BI and BO are all binary digits we can replace the multiplies by ANDsExplanation / Answer
a. Binary form of +12 is 00001100 MSB Bit is 0
b. Binary form of -12 is 00011100 MSB Bit is 1
c. Binary form of +32 is 00100000 MSB Bit is 0
d. Binary form of -32 is 01100000 MSB Bit is 1
a. Binary addition of 12 +( - 32 ) using 2's complement
binary form of 12 is 0001100
binary form of +32 is 0100000
1's complement of 0100000 is 1011111 (2's complement = 1's complement of given number + 1 )
2's complement of - 32 is 1100000
addition of 12 + (- 32 ) is
12 - 0001100
-32 - 1100000
_____________
1101100
In binary addition 0+0 is 0, 0+1 is 1, 1+0 is 1, 1+1 is 0 with carry 1
Finally addition 12+ ( -32 ) using 2's complement is 1101100
b. Addition of 32 + (-12) using 2's complement
Binary form of 32 is 100000
Binary form of +12 is 01100
1's complement of -12 is 10011
2's complement of -12 is 10100
addition of 32 + (-12) is 100000 + 10100 is 110100
Finally addition of 31 + (-12) using 2's complement is 110100
c. Substraction of -12 - (32) is
Binary form of -12 is 00011000
Binary form of 32 is 0010 0000
1's complement of 32 is 1101 1111
2's complementbof 32 is 1110 0000
substraction of -12 -(32) is 0001 1000 - 1110 0000 = 1011 1000 with borrow bit 1
In binary substraction 0-0 = 0, 1-0 = 1, 1-1 = 0, 1-1 = 1 with borrow 1
Finally substraction of -12 -(32) is 110111000
d. Substraction of -12 - (-32) using 2's complement
binary form of -12 is 11100
binary form of +32 is 0100000
1's complement of -32 is 1011111
2's complement of -32 is 1100000
substraction of -12 - (-32) is 00011100 - 01100000 = 0011 1100
Finally substraction of -12 -(-32) using 2's complemen is 00111100
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.