Difference between revisions of "Addition"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Created page with "=Binary Addition= Binary addition is done similarly to normal addition but instead of a value of 10 being carried, in binary addition a value of 2 is carried to the next colum...")
 
(TRC PowerPoint)
 
(102 intermediate revisions by 10 users not shown)
Line 1: Line 1:
=Binary Addition=
+
=Overview=
Binary addition is done similarly to normal addition but instead of a value of 10 being carried, in binary addition a value of 2 is carried to the next column.  
+
 
 +
===CraignDave===
 +
Addition is covered from 0:00 until 5:46
 +
 
 +
<youtube>https://www.youtube.com/watch?v=t15dhDG_WUA&list=PLCiOXwirraUDGCeSoEPSN-e2o9exXdOka&index=2</youtube>
 +
 
 +
https://www.youtube.com/watch?v=t15dhDG_WUA&list=PLCiOXwirraUDGCeSoEPSN-e2o9exXdOka&index=2 (0:00 - 5:46)
  
There are for possibilities when adding binary numbers, these possibilities are:
+
===Computer Science Tutor===
 +
<youtube>4wrBpIYimrw</youtube>
  
A total of 0 (0+0) put down 0
+
https://www.youtube.com/watch?v=4wrBpIYimrw&list=PL04uZ7242_M6O_6ITD6ncf7EonVHyBeCm&index=4
  
A total of 1 (1+0, 0+1 or 0+0+carried 1) put down 1
+
=Binary Addition=
 +
Binary addition is being able to add two numbers together which are represented in binary form, which consist of 1s and 0s, you can add them together by converting them into denary, adding It together and then converting it back but its much faster to use the column addition method which you will see below.
  
A total of 2 (1+1) put down 0, carry 1
+
There are four possibilities when adding binary numbers, these possibilities are:
  
A total of 3 (1+1+ carried 1) put down 1, carry 1
+
a total of 0 (0+0) put down 0
 +
a total of 1 (1+0, 0+1 or 0+0+carried 1) put down 1
 +
a total of 2 (1+1) put down 0, carry 1
 +
a total of 3 (1+1+ carried 1) put down 1, carry 1
  
 
For example, solve 6+7 using binary addition:  
 
For example, solve 6+7 using binary addition:  
Line 16: Line 27:
 
First convert 6 and 7 from denary to binary using your preferred method
 
First convert 6 and 7 from denary to binary using your preferred method
  
6 = 4+2+0 = 110
+
6 = 4+2+0 = 110
7 = 4+2+1 = 111
+
7 = 4+2+1 = 111
 +
 
 +
Then add them keeping in mind the 4 possibilities and add each digit together, starting on the right:
  
Then add them keeping in mind the 4 possibilities
+
110  +
 +
111
 +
---
 +
So:
 +
0+1 = 1<br>
 +
1+1 = 0 carry 1<br>
 +
1+1+ carried 1 = 1 carry 1<br>
 +
1 + 0 = 1
  
110 +
+
so 110+111 = 1101. Converting this number back to denary gives us an answer of 13.
  
111
+
===Another Example===
 +
[[File:Binary-additio.jpg|Binary Addition ]]
  
0+1 = 1
+
===Adding More Numbers Together===
1+1 = 0 carry 1
+
You could get 3 numbers to add however you wont be given a situation in which there are more than a total of 3.
1+1+ carried 1 = 1 carry 1
 
1 + 0 = 1
 
  
so 110+111 = 1101. Converting this number back to denary gives us an answer of 13.
+
For example:
 +
  101
 +
  101+
 +
  011+
 +
----
 +
 
 +
Which would = 1101
 +
 
 +
If you do end up in a situation where you have more than 3 ones, you need to miss a column and place the carry in the next one.
 +
 
 +
=Revision=
 +
 
 +
<quiz display=simple>
 +
{
 +
|type="{}"}
 +
What is 00110101 + 01010001 in binary?
 +
{ 10000110 }
 +
|| 1+1 = 2. Put down o, carry 1
 +
||0+0+1 = 1. Put down 1, carry 0
 +
||1+0 = 1. Put down 1, carry 0
 +
||0+0 = 0. Put down 0 carry 0
 +
||1+1 = 2. Put down 0, carry 1
 +
||1+0+1 = 2. Put down 0, carry 1
 +
||0+1+1 = 2. Put down 0, carry 1
 +
||0+0+1 = 1. Put down 1, carry 0
 +
||10000110
 +
 
 +
{
 +
|type="{}"}
 +
What is 01110001 + 00011111 in denary?
 +
{ 194 }
 +
||1+1 = 2. Put down 0, carry 1
 +
||0+0+1 = 1. Put down 1, carry 0
 +
||0+0 = 0. Put down 0, carry 0
 +
||0+0 = 0.Put down 0, carry 0
 +
||1+1 = 2. Put down 0, carry 1
 +
||1+0+1 = 2. Put down 0, carry 1
 +
||1+1+1 = 3. Put down 1, carry 1
 +
||0+0+1 = 1. Put down 1, carry 0
 +
||11000010
 +
||128+64+2 = 194
 +
 
 +
{
 +
|type="{}"}
 +
What is 01101110 + 01100101 in 8-bit binary?
 +
{ 11010011 }
 +
 
 +
|| 0 + 1 = 1. Put down 1, carry 0.
 +
|| 1 + 0 = 1. Put down 1, carry 0.
 +
|| 1 + 1 = 2. Put down 0, carry 1.
 +
|| 0 + 1 + 1 = 2. Put down 0, carry 1.
 +
|| 0 + 0 + 1 = 1. Put down 1, carry 0.
 +
|| 1 + 1 = 2. Put down 0, carry 1.
 +
|| 1 + 1 + 1 = 3. Put down 1, carry 1.
 +
|| 0 + 0 + 1 = 1. Put down 1, carry 0.
 +
||11010011
 +
 
 +
{
 +
|type="{}" }
 +
What is it called when the numbers adds together to make a number bigger than 255 so doesn't fit into the 8 bits?
 +
{ Overflow }
 +
 
 +
|| This is an overflow.
 +
 
 +
{What do you do when you have an overflow?
 +
|type="()"}
 +
 
 +
 
 +
-Add it anyway and then forget the overflow
 +
+Add an extra bit
 +
-give up
 +
-Subtract the numbers instead
 +
 
 +
{
 +
|type="{}"}
 +
What is 01100010 + 01001101 in 8 bit binary?
 +
{ 10101111 }
 +
 
 +
||Add the one no carry
 +
||Add the one no carry
 +
||Add the one no carry
 +
||Add the one no carry
 +
||Don't add anything because its zero
 +
||Add the one no carry
 +
||Add the one carry the 1
 +
||Add the carry to the 0's so its a 1
 +
 
 +
 
 +
{
 +
|type="{}"}
 +
What is 10110100 + 00110101 in 8 bit binary?
 +
{ 11101001 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 11001100 + 10101010 in 8 bit binary?
 +
{ 101110110 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 11010101 + 01011100 in 8 bit binary?
 +
{ 100110001 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 10101111 + 01101101 in 8 bit binary?
 +
{ 10101111 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 10101100 + 01001100 in 8 bit binary?
 +
{ 11111000 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 11001010 + 01001111 in 8 bit binary?
 +
{ 100011001 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 011101 + 01000001 in 8 bit binary?
 +
{ 1011110 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 11111100 + 11000010 in 8 bit binary?
 +
{ 110111110 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 11010111 + 11100111 in 8 bit binary?
 +
{ 1010001110 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 10110011 + 11001111 in 8 bit binary?
 +
{ 110000010 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 11111000 + 00011101 in 8 bit binary?
 +
{ 100010101 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 11000011 + 01101100 in 8 bit binary?
 +
{ 100101111 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 110010 + 11100111 in 8 bit binary?
 +
{ 100011001 }
 +
 
 +
{
 +
|type="{}"}
 +
What is 11011010 + 11110010 in 8 bit binary?
 +
{ 1011001100 }
 +
</quiz>

Latest revision as of 08:24, 25 September 2020

Overview

CraignDave

Addition is covered from 0:00 until 5:46

https://www.youtube.com/watch?v=t15dhDG_WUA&list=PLCiOXwirraUDGCeSoEPSN-e2o9exXdOka&index=2 (0:00 - 5:46)

Computer Science Tutor

https://www.youtube.com/watch?v=4wrBpIYimrw&list=PL04uZ7242_M6O_6ITD6ncf7EonVHyBeCm&index=4

Binary Addition

Binary addition is being able to add two numbers together which are represented in binary form, which consist of 1s and 0s, you can add them together by converting them into denary, adding It together and then converting it back but its much faster to use the column addition method which you will see below.

There are four possibilities when adding binary numbers, these possibilities are:

a total of 0 (0+0) put down 0
a total of 1 (1+0, 0+1 or 0+0+carried 1) put down 1
a total of 2 (1+1) put down 0, carry 1
a total of 3 (1+1+ carried 1) put down 1, carry 1

For example, solve 6+7 using binary addition:

First convert 6 and 7 from denary to binary using your preferred method

6 = 4+2+0 = 110
7 = 4+2+1 = 111

Then add them keeping in mind the 4 possibilities and add each digit together, starting on the right:

110  +
111
---

So:

0+1 = 1
1+1 = 0 carry 1
1+1+ carried 1 = 1 carry 1
1 + 0 = 1

so 110+111 = 1101. Converting this number back to denary gives us an answer of 13.

Another Example

Binary Addition

Adding More Numbers Together

You could get 3 numbers to add however you wont be given a situation in which there are more than a total of 3.

For example:

 101 
 101+
 011+
----

Which would = 1101

If you do end up in a situation where you have more than 3 ones, you need to miss a column and place the carry in the next one.

Revision

1.

What is 00110101 + 01010001 in binary?
→ 1+1 = 2. Put down o, carry 1
→ 0+0+1 = 1. Put down 1, carry 0
→ 1+0 = 1. Put down 1, carry 0
→ 0+0 = 0. Put down 0 carry 0
→ 1+1 = 2. Put down 0, carry 1
→ 1+0+1 = 2. Put down 0, carry 1
→ 0+1+1 = 2. Put down 0, carry 1
→ 0+0+1 = 1. Put down 1, carry 0
→ 10000110

2.

What is 01110001 + 00011111 in denary?
→ 1+1 = 2. Put down 0, carry 1
→ 0+0+1 = 1. Put down 1, carry 0
→ 0+0 = 0. Put down 0, carry 0
→ 0+0 = 0.Put down 0, carry 0
→ 1+1 = 2. Put down 0, carry 1
→ 1+0+1 = 2. Put down 0, carry 1
→ 1+1+1 = 3. Put down 1, carry 1
→ 0+0+1 = 1. Put down 1, carry 0
→ 11000010
→ 128+64+2 = 194

3.

What is 01101110 + 01100101 in 8-bit binary?
→ 0 + 1 = 1. Put down 1, carry 0.
→ 1 + 0 = 1. Put down 1, carry 0.
→ 1 + 1 = 2. Put down 0, carry 1.
→ 0 + 1 + 1 = 2. Put down 0, carry 1.
→ 0 + 0 + 1 = 1. Put down 1, carry 0.
→ 1 + 1 = 2. Put down 0, carry 1.
→ 1 + 1 + 1 = 3. Put down 1, carry 1.
→ 0 + 0 + 1 = 1. Put down 1, carry 0.
→ 11010011

4.

What is it called when the numbers adds together to make a number bigger than 255 so doesn't fit into the 8 bits?
→ This is an overflow.

5. What do you do when you have an overflow?

Add it anyway and then forget the overflow
Add an extra bit
give up
Subtract the numbers instead

6.

What is 01100010 + 01001101 in 8 bit binary?
→ Add the one no carry
→ Add the one no carry
→ Add the one no carry
→ Add the one no carry
→ Don't add anything because its zero
→ Add the one no carry
→ Add the one carry the 1
→ Add the carry to the 0's so its a 1

7.

What is 10110100 + 00110101 in 8 bit binary?

8.

What is 11001100 + 10101010 in 8 bit binary?

9.

What is 11010101 + 01011100 in 8 bit binary?

10.

What is 10101111 + 01101101 in 8 bit binary?

11.

What is 10101100 + 01001100 in 8 bit binary?

12.

What is 11001010 + 01001111 in 8 bit binary?

13.

What is 011101 + 01000001 in 8 bit binary?

14.

What is 11111100 + 11000010 in 8 bit binary?

15.

What is 11010111 + 11100111 in 8 bit binary?

16.

What is 10110011 + 11001111 in 8 bit binary?

17.

What is 11111000 + 00011101 in 8 bit binary?

18.

What is 11000011 + 01101100 in 8 bit binary?

19.

What is 110010 + 11100111 in 8 bit binary?

20.

What is 11011010 + 11110010 in 8 bit binary?

Your score is 0 / 0