Lab 1: Number Systems: Họ và tên: Phùng Quốc Khánh MSSV: 2193929

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Họ và tên: Phùng Quốc Khánh MSSV: 2193929

LAB 1: NUMBER SYSTEMS

1. Convert the following binary numbers to decimal:


a) 11 = 3 b) 100 = 4 c) 111 = 7 d) 1000 = 8
e) 1001 = 9 f) 1100 = 12 g) 1011 = 11 h) 1111 = 15

2. Convert each binary number to decimal:


a) 110011.11 = 51.75
b) 101010.01 = 42.25
c) 1000001.111 = 65.875
d) 1111000.101 = 120.625
e) 1011100.10101 = 92.656
f) 1110001.0001 = 113.062
g) 1011010.1010 = 90.625
h) 1111111.11111 = 127.968

3. How many bits are required to represent the following decimal numbers?
(a) 17 = 5 (b) 35 = 6 (c) 49 = 6 (d) 68 = 7
(e) 81 = 7 (f) 114 = 7 (g) 132 = 8 (h) 205 = 8

4. Convert each decimal number to binary by using the sum-of-weights method:


(a) 10 = 1010 (b) 17 = 10001 (c) 24 = 11000 (d) 48 = 110000

5. Convert each decimal fraction to binary using the sum-of-weights method:


(a) 0.32 = 0.0101 (b) 0.246 = 0.001 (c) 0.0981 = 0.0001 (d) 0.75 = 0.11

6. Convert each decimal number to binary using repeated division by 2:


(a) 15 = 1111 (b) 21 = 10101 (c) 28 = 11100 (d) 34 = 100010

7. Convert each decimal fraction to binary using repeated multiplication by 2:


(a) 0.98 = 0.1111 (b) 0.347 = 0.0101 (c) 0.9028 = 0.1110

8. Add the binary numbers:


(a) 11 + 01 = 100 (b) 111 + 110 = 1101 (c) 1001 + 101 = 1110
(d) 1101 + 1011 = 10110

9. Use direct subtraction on the following binary numbers:


(a) 1110 – 11 = 1011 (b) 101 – 100 = 1 (c) 1100 – 1001 = 11 (d) 11010 – 10111
= 11

10. Perform the following binary multiplications:


(a) 1101 x 1101 = 10101001 (b) 111 x 101 = 100011 (c) 1110 x 1101 = 10110110

11. Divide the binary numbers as indicated:


(a) 100 / 10 = 10 (b) 1001 / 11 = 11 (c) 1100 / 100 = 11

12. Determine the 1's complement of each binary number:


(a) 101 = 010 (b) 110 = 001 (c) 1010 = 0101
(d) 11010111 = 00101000 (e) 1110101= 0001010 (f) 00001 = 11110

13. Determine the 2's complement of each binary number using either method:
(a) 10 = 10 (b) 111 = 001 (c) 1001 = 0111 (d) 1101 = 0011
(e) 11100 = 00100 (f) 10011 = 01101 (g) 10110000 = 01010000 (h)
00111101 = 11000011

14. Express each decimal number in binary as an 8-bit sign-magnitude number:


(a) +29 = 00011101 (b) -85 = 11010101 (c) + 100 = 01100100 (d) -123 =
11111011

15. Express each decimal number as an 8-bit number in the 1's complement form:
(a) -34 (b) +57 (c) -99 (d) +115

16. Express each decimal number as an 8-bit number in the 2's complement form:
(a) + 12 (b) -68 (c) + 101 (d) -125

17. Convert each hexadecimal number to binary:


(a) 3816 = 111000 (b) 5916 = 1011001 (c) A1416 = 101000010100
(e) 410016 = 1111101100010111 (f) FBl716 = 1111101100010111
(g) 8A9D16 = 1000101010011101

18. Convet1 each octal number to decimal:


(a) 128 = 10 (b) 1038 = 67 (c) 10248 = 532 (d) 77658 = 4085

You might also like