You are on page 1of 2

Assignment 2: Signed Integers

Full in name: Tô Thành Hậu


Student ID: 22110319
1. Write each of the following signed decimal integers in 8-bit
binary notation:
If any number cannot be represented as a signed 8-bit binary
number, indicate this in your answer.
a. -2 = 111111102 e.+15 = 000011112
b. -7 = 111110012 f.-1 = 111111112
c. -128 = 100000002 g.-56 = 110010002
d. -16 = 111100002 h.+127 = 0111111112

2. Write each of the following 8-bit signed binary integers in


decimal:
a. 11111111 = -110 g.00001111 = +1510
b. 11110000 = -1610 h.10101111 = -8110
c. 10000000 = -12810 i.11111100 = -410
d. 10000001 = -12710 j.01010101 = +8510

3. Which of the following integers are valid 16-bit signed decimal


integers?
(indicate V=valid, I=invalid)
a. +32469 (V) d.+32785 (I)
b. +32767 (V) e.-32785 (I)
c. -32768 (V) f.+65535 (I)

4. Indicate the sign of each of the following 16-bit hexadecimal


integers:
(indicate P=positive, N=negative)
a. 7FB9h (P) c.0D000h (P)
b. 8123h (N) d.649Fh (P)

5. Write each of the following signed decimal integers as a 16-bit


hexadecimal value:
a. -42 = FFD616 e.-32768 = 800016
b. -127 = FF8116 f.-1 = FFFF16
c. -4096 = F00016 g.-8193 = DFFF16
d. -16 = FFF016 h.-256 = FF0016

You might also like