


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A self assessment programme for students to acquire a basic understanding of binary numbers, focusing on addition and subtraction. It includes examples, exercises, and quizzes to test comprehension.
Typology: Essays (high school)
1 / 42
This page cannot be seen from the preview
Don't miss anything!



































Basic Engineering
F Hamer, R Horan & M Lavelle
The aim of this document is to provide a short, self assessment programme for students who wish to acquire a basic understanding of the addition and subtraction of binary numbers.
Copyright ยฉc 2005 Email: chamer, rhoran, [email protected] Last Revision Date: March 17, 2005 Version 1.
The full range of these packages and some instructions, should they be required, can be obtained from our web page Mathematics Support Materials.
Section 1: Binary Numbers (Introduction) 4
Example 2 The binary number 11 is 1 ร 2 + 1 ร 1 = 1 ร 21 + 1 ร 20 which in decimal is 3.
NB For the rest of this document a number in decimal form will be written with a subscript 10. Thus 394 will now be written as 394 10. The number 11 10 means the usual decimal number eleven whereas the binary number of example 2 is written 11 or 3 10.
Example 3 Convert the binary number 1110101 into a decimal number.
Solution
Binary weight: 26 25 24 23 22 21 20 Weight value: 64 32 16 8 4 2 1 Binary digit: 1 1 1 0 1 0 1
The number, in decimal form, is thus
1 ร 64 + 1 ร 32 + 1 ร 16 + 0 ร 8 + 1 ร 4 + 0 ร 2 + 1 ร 1 = = 64 + 32 + 16 + 4 + 1 = 117 10.
Section 1: Binary Numbers (Introduction) 5
Exercise 1. Convert the following binary numbers into decimal form. (Click on the green letters for the solutions.) (a) 10, (b) 101, (c) 111, (d) 110, (e) 1011, (f) 1111, (g) 1001, (h) 1010.
The binary numbers seen so far use only positive powers of 2. Fractional binary numbers are defined using negative powers of 2.
Example 4 Convert the binary number 0.1101 into decimal form.
Solution For this type of binary number the first digit after the decimal point has weight 2โ^1 , the second has weight 2โ^2 , and so on.
Binary weight: 2 โ^1 2 โ^2 2 โ^3 2 โ^4 Weight value: 0.5 0.25 0.125 0. Binary digit 1 1 0 1
The binary number in decimal form is thus
1 ร 0 .5 + 1 ร 0 .25 + 0 ร 0 .125 + 1 ร 0. 0625 = 0.5 + 0.25 + 0.0625 = 0. 812510.
Section 2: Binary Addition 7
Basic Rules for Binary Addition
0+0 = 0 0 plus 0 equals 0 0+1 = 1 0 plus 1 equals 1 1+0 = 1 1 plus 0 equals 1 1+1 = 10 1 plus 1 equals 0 with a carry of 1 (binary 2)
The technique of addition for binary numbers is similar to that for decimal numbers, except that a 1 is carried to the next column after two 1s are added.
Example 5 Add the numbers 3 10 and 1 10 in binary form.
Solution The numbers, in binary form, are 11 and 01. The procedure is shown on the next page.
Section 2: Binary Addition 8
In the right-hand column, 1 + 1 = 0 with a carry of 1 to the next column. In the next column, 1 + 0 + 1 = 0 with a carry of 1 to the next column. In the left-hand column, 1 + 0 + 0 = 1.
Thus, in binary, 11 + 01 = 100 = 4 10.
Exercise 3. In the questions below, two numbers are given in decimal form. In each case, convert both numbers to binary form, add them in binary form and check that the solution is correct by converting the answer to decimal form. (Click on the green letters for solutions.) (a) 3+3, (b) 7+3, (c) 4+2, (d) 6+4, (e) 15+12, (f) 28+19,
Quiz What is the result of adding together the three binary numbers 101 , 110 , 1011?
(a) 10110, (b) 11010, (c) 11001, (d) 11110.
Section 3: Binary Subtraction 10
Exercise 4. In each of the questions below, a subtraction is written in decimal form. In each case, convert both numbers to binary form, subtract them in binary form and check that the solution is correct by con- verting the answer to decimal form. (Click on the green letters for solutions.)
(a) 3 โ 1, (b) 3 โ 2, (c) 4 โ 2,
(d) 6 โ 4, (e) 9 โ 6, (f) 9 โ 7.
Quiz Choose the correct answer from below for the result of the binary subtraction 1101 โ 111.
(a) 110, (b) 101, (c) 111, (d) 11.
Section 4: Quiz on Binary Numbers 11
Begin Quiz
End Quiz
Solutions to Exercises 13
Exercise 1(b)
The binary number 101 is
101 = 1 ร 22 + 0 ร 21 + 1 ร 20 = 1 ร 4 + 1 ร 1
which in decimal form is 5 10. Click on the green square to return
Solutions to Exercises 14
Exercise 1(c)
The binary number 111 is
111 = 1 ร 22 + 1 ร 21 + 1 ร 20 = 1 ร 4 + 1 ร 2 + 1 ร 1
which in decimal form is 7 10. Click on the green square to return
Solutions to Exercises 16
Exercise 1(e)
The binary number 1011 is
1011 = 1 ร 23 + 0 ร 22 + 1 ร 21 + 1 ร 20 = 1 ร 8 + 1 ร 2 + 1 ร 1
which in decimal form is 11 10. Click on the green square to return
Solutions to Exercises 17
Exercise 1(f )
The binary number 1111 is
1111 = 1 ร 23 + 1 ร 22 + 1 ร 21 + 1 ร 20 = 1 ร 8 + 1 ร 4 + 1 ร 2 + 1 ร 1
which in decimal form is 15 10. Click on the green square to return
Solutions to Exercises 19
Exercise 1(h)
The binary number 1010 is
1010 = 1 ร 23 + 0 ร 22 + 1 ร 21 + 0 ร 20 = 1 ร 8 + 1 ร 2
which in decimal form is 10 10. Click on the green square to return
Solutions to Exercises 20
Exercise 2(a)
The binary number 0.11 is
0 .11 = 1 ร 2 โ^1 + 1 ร 2 โ^2 = 1 ร 0 .5 + 1 ร 0. 25
which in decimal form is 0. 7510. Click on the green square to return