Calculate the following in 4-bit Two’s compliment integer representation? Indica
ID: 3901857 • Letter: C
Question
Calculate the following in 4-bit Two’s compliment integer representation? Indicate if overflow.
4 + 2
5 + 3
-1 + - 5
-2 + -7
5 + -2
-3 + 4
8 + -8
1 + -7
5 – 7
-6 - 5
-1 – 1
0 - 1
1. Promote the following 4-bit 2’s complement integers to 8-bit representation.
0001
1000
1111
1010
0111
BCD & Excess-K
3. Convert the decimal number 123 to BCD (8421) representation?
5. What is the largest and smallest value in 4-bit Excess-7 notation?
Exercise: Assume unsigned 8-bit representation. Calculate 170 + 139 and 170 - 139.
Show your work in both binary & hex.
+ 10101010 - 10101010
10001011 10001011
A A A A
+ 8 B - 8 B
4 + 2
5 + 3
-1 + - 5
-2 + -7
5 + -2
-3 + 4
8 + -8
1 + -7
5 – 7
-6 - 5
-1 – 1
0 - 1
Explanation / Answer
Hello!
I see three seperate questions in your question.
1. Promote the following 4-bit 2’s complement integers to 8-bit representation.
0001
1's complement will be - 1110
2's complement will be - 1111
Converted to 8-bit - 00001111
1000
1's complement will be - 111
2's complement will be - 1000
Converted to 8-bit - 00001000
1111
1's complement will be - 0
2's complement will be - 1
Converted to 8-bit - 00000001
0111
1's complement will be - 1000
2's complement will be - 1001
Converted to 8-bit - 00001001
3. Convert the decimal number 123 to BCD (8421) representation?
123 into BCD (8421)
1 - 0001
2 - 0010
3 - 0011
123 - (0001 0010 0011)
5. What is the largest and smallest value in 4-bit Excess-7 notation?
Largest - 1111
1*8 + 1*4 + 1*2 + 1*1 = 15
Then subtract the excess value, 7
15-7 = 8
8 is the maximum value.
Minimum value
0*8 + 0*4 + 0*2 + 0*1 = 0
Subtracting the excess value 0-7
-7 is the smallest value.
Additional :
Exercise: Assume unsigned 8-bit representation. Calculate 170 + 139 and 170 - 139.
Show your work in both binary & hex.
10101010
+ 10001011
= 100110101 (309)
10101010
- 10001011
= 00011111 (31)
A A
+ 8 B
= 135 (309)
A A
- 8 B
= 1 F (31)
Thank you. Feel free to ask anything.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.