Documente Academic
Documente Profesional
Documente Cultură
1
Prepared by Mrs. Wimali Perera
Addition of floating point numbers
First you have to arrange the numbers into same exponent and then add them.
245.67 + 4584
2.4567 x 10 2 +
45.8400 x 102
__________________________
1. 5362 + 234.78
2. 1456.3 + 567.56
3. 36789 + 231.678
4. 89 + 456.89
Binary addition
2
Prepared by Mrs. Wimali Perera
Binary Subtraction
3
Prepared by Mrs. Wimali Perera
Binary Multiplication
Binary Division
Octal Addition
4
Prepared by Mrs. Wimali Perera
Octal Subtraction
5
Prepared by Mrs. Wimali Perera
Hexadecimal Addition
6
Prepared by Mrs. Wimali Perera
Hexadecimal Subtraction
Weigh
22 21 20 . 2-1 2-2 2-3 2-4
t
Place
4 2 1 . 0.5 0.25 0.125 0.0625
Value
Convert the following decimal fractions into binary fractions.
1. 0.5 7. 15.1875
2. 0.125 8. 35.875
3. 4.25 9. 75.2
4. 8.3125 10. 0.350
5. 17.9375 11. 12.575
6. 72.375 12. 25.135
7
Prepared by Mrs. Wimali Perera
Convert the following binary fractions into decimal fractions.
1. 37 3. -100 5. -48
2. -65 4. 84 6. -15
1. 45 + 25 5. 8 + (-60) 9. 40 + (-30)
2. 45 + (-25) 6. 40 + (-50) 10. (-125) + 130
3. 25 + (-45) 7. (-50) + 30
4. 56 + (-53) 8. (-65) + (-8)
1. -
2. 37 6. -48 9. -64
3. -65 7. -15 10. -79
4. -100 8. -125 11. -460
5. -84
Bitwise Operators
1. Bitwise AND (&) Operator
8
Prepared by Mrs. Wimali Perera
2. Bitwise OR ( | ) Operator
9
Prepared by Mrs. Wimali Perera
3.
10
Prepared by Mrs. Wimali Perera
5. Bitwise Left Shift ( << ) Operator
Revision
2011 AL
1. The binary equivalent to decimal 27 is…..
(1) 000111 (2) 111000 (3) 011011 (4) 101011 (5) 111010
2. C1A16 + 4A216 = ?
(2) 523 (2) FBC (3) FBB (4) 0BC (5) 10BC
3. Show how the computation of 5 + (-3) is done in 8 bit two’s complement arithmetic. Explain
how you deal with the carry bit generated from the most significant bit.
2012 AL
4. The binary equivalent of decimal 37 is?
(1) 0100101 (2) 0100111 (3) 0100100
(4) 0110110 (5) 0110111
5. 1448 + 1758 = ?
(1) 225 (2) 341 (3) 441 (4) 531 (5)314
6. Show how the computation of 15 + (-5) is done in 8 bit two’s complement arithmetic.
Explain how you deal with the carry bit generated from the most significant bit.
2013 AL
7. The binary equivalent of decimal 25 is…
(1) 0100101 (2) 0100111 (3) 0011001
(4) 00101110 (5) 0010111
8. 1248 +1658 = ?
(1) 2048 (2) 28910 (3) 2898 (4) 3118 (5) 3898
11
Prepared by Mrs. Wimali Perera
(4) 01011111 (5) 00000101
10. Convert 1310 and -1910 into two’s complement arithmetic. Use 8 bit
representation.
11. Compute 1310 – 1910 by using two’s complement numbers obtained in above and
give the answer in twos complement form.
12. Explain how the positive and negative numbers in two’s complement can be converted to
decimal numbers.
2014 AL
13. The decimal number equivalent to the binary 100111 is…
(1) 40 (2) 39 (3)42 (4) 37 (5)36
2015 AL
16. Assume that in a particular digital device integers are represented in 8 bit two’s
complement form. However the results of computations are printed in decimal.
(1) Give the representation of 1010 in the above device.
(2) Give the representation of -2510 in the above device.
(3) Explain how the computation of 1010 -2510 done by the device by using your
representations given in sections (1) and (2) above.
(4) List the steps necessary to transform the results obtained in (3) above into decimal form
in order to print the answer.
2016 AL
2017 AL
18. 10116 + 1108 = ?
(1) 42910 (2) 101110 (3) 32910
(4) 52910 (5) 13710
19. What is the two’s complement representation of 45, if an integer is represented by bits?
(1) 11010011 (2) 10110011 (3) 11001101
(4) 00101111 (5) 00101101
20. Which of the following numbers is equivalent to the binary number 101111?
(1) 578 (2) 5716 (3) 5710
(4) 5916 (5) 5F16
12
Prepared by Mrs. Wimali Perera
21. 5D16 + 101112 = ?
(1) 738 (2) 7516 (3) 1168
(4) 1638 (5) 1648
13
Prepared by Mrs. Wimali Perera