Express the decimal number (-37)10 as an 8-bit 2's complement binary number.
Given the two signed binary numbers (2's comp.) X = -8 and Y = 14, what is their sum?
What is the BCD representation of the decimal value (9371)10?
In 2's Complement Binary Representation we represent signed numbers As signed number are of two types Positive and Negative
1. To represent Positive Numbers we write simply the binary form of that number
2. To represent the Negative Numbers we take 2's Complement of its positive value . For Example - A = ( 2's complement of A )
Here MSB bits decide the sign of the Number
If MSB =1 then Number is Negative
If MSB=0 Then Number is Positive
So We have Decimal Number
-37 = 2's Complement of 37
37 = 11011011
So we get (-37) 10 in 2's complement binary number.= 11011011
Format of Addition of Two Numbers = A - B = A + ( 2's Complement of B )
Here We have
X = -8 and y = 14
S0 14 - 8 = 14 + ( 2's complement of 8 )
14 = 00001110
-8 = 2's complement of 8 = 11111000
Now add them
00001110
+11111000
------------------
00000110
Now As MSB = 0 so Result is positive and without any overflow
Hence we get Result as = 0000 0110= (6) 10
This is how addition of two signed number is done in 2's Complement method
Convert Decimal To BCD Representation
Firstly, separate the decimal number into its weighted digits and then write down the equivalent 4-bit BCD code representing each decimal digit
So we have (9371)10
Separating the digits and writing each 4 bit
9 = 1001
3 = 0011
7 = 0111
1 = 0001
Combine all together we get
BCD Of (9371)10 = 1001001101110001
This is how we can convert any decimal to BCD
So These are the Complete Solution of all the Questions asked
Thank You
If u like the answer do Upvote it and have any doubt ask in comments
Get Answers For Free
Most questions answered within 1 hours.