02 Lesson2
02 Lesson2
Learning Outcomes
By the end of this lesson, students will be able to;
1
2 ITE 1812 - Mathematic for IT
Example 2.1
Add the binary numbers 110010 and 110111.
Solution.
Example 2.2
Subtract the binary numbers 101101 and 100111.
Solution.
Example 2.3
Multiply the binary numbers 1011 and 101.
Solution.
2
Degree of Bachelor of Information Technology 3
Example 2.4
Divide the binary numbers 11001 and 101.
Solution.
3
4 ITE 1812 - Mathematic for IT
Example 2.5
(a) What is the one’s complement binary representation of decimal number −75?
(b) What is the one’s complement binary representation of decimal number 11?
Solution.
Example 2.6
(a) What is the two’s complement binary representation of decimal number −75?
(b) What is the two’s complement binary representation of decimal number 11?
Solution.
4
Degree of Bachelor of Information Technology 5
(b) If an end carry does not occurs, take the two’s complement of the number obtained
in step 1 and place a negative sign in front.
Example 2.7
Using two’s complement do the following subtraction.
(a) 17 − 10
(b) 26 − 75
Solution.
Self-Assessment Exercises
1. Do the following binary arithmetics.
2. Give the representation of the following negative numbers on a computer using two’s
compliment.
(a) −19710
(b) −198710
(c) −4932110
5
6 ITE 1812 - Mathematic for IT
(a) 29 − 12
(b) 9457 − 6785
(c) 5830 − 876
Suggested Reading
Chapter 19: William Stallings, (2010) Computer Organization and Architecture: Designing for
Performance, 9th Edition, Prentice Hall.