Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Worksheet: Binary addition, Lecture notes of Number Theory

Start with this simple sum. (You can use rules (a) and (b) to help you if necessary.) Calculate the decimal equivalent and check that it is ...

Typology: Lecture notes

2021/2022

Uploaded on 09/12/2022

mangaxxx
mangaxxx 🇬🇧

4.7

(10)

218 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
!
!
1
!
Worksheet: Binary addition
Use the rules a e of binary addition below as a guide to work out the answers to the
questions
a. 0 + 0 = 0
b. 0 + 1 = 1
c. 1 + 0 = 1
d. 1 + 1 = 0 carry 1 = 10
e. 1 + 1 + 1 = 1 carry 1 = 11
1. Start with this simple sum. (You can use rules (a) and (b) to help you if necessary.)
Calculate the decimal equivalent and check that it is correct.
8
4
2
1
Decimal
0
0
1
1
=
3
+
1
0
0
0
=
+
=
=
=
2. Use the same techniques as you did in the last question to find the binary result.
1
0
0
1
0
1
0
0
3, Use the carry row at the top for the carried 1.
1
0
1
1
+
0
0
1
0
=
4. Now use rule (d) to help with this problem. Remember that like in decimal addition, the
last carry just makes the number bigger and is added on to the left of the number.
1
0
1
1
+
1
0
1
0
=
pf3

Partial preview of the text

Download Worksheet: Binary addition and more Lecture notes Number Theory in PDF only on Docsity!

Worksheet: Binary addition

Use the rules a – e of binary addition below as a guide to work out the answers to the questions a. 0 + 0 = 0 b. 0 + 1 = 1 c. 1 + 0 = 1 d. 1 + 1 = 0 carry 1 = 10 e. 1 + 1 + 1 = 1 carry 1 = 1 1

  1. Start with this simple sum. (You can use rules (a) and (b) to help you if necessary.) Calculate the decimal equivalent and check that it is correct. 8 4 2 1 Decimal 0 0 1 1 = 3
  • 1 0 0 0 = + = = =
  1. Use the same techniques as you did in the last question to find the binary result. 1 0 0 1
  • 0 1 0 0 = 3 , Use the carry row at the top for the carried 1. 1 0 1 1
  • 0 0 1 0 =
  1. Now use rule (d) to help with this problem. Remember that like in decimal addition, the last carry just makes the number bigger and is added on to the left of the number. 1 0 1 1
  • 1 0 1 0 =
  1. Use rule (e) in this question. Use the carry row again and remember: 1+1+1 = 1 carry 1.
  1. Increase the size of the numbers using a 6-bit pattern. Apply the same rules as before.
  1. Now try a full 8-bit binary pattern.
  1. Now try without the help of the grid or rules (a) to (e) to refer to.

An 8-bit binary pattern can hold 256 different numbers – 0 – 255. When the result of the addition is greater than 255, an overflow error occurs!

  1. Try and work out the answer here using all the normal rules and see if you get an overflow error.