Lesson
Binary addition
Binary addition rules
02 + 02 = 02
02 + 12 = 12
12 + 02 = 12
12 + 12 = 102 (carry 1)
12 + 12 + 12 =112 (carry 1)
Binary Shift
The binary shift operator is used to perform multiplication and division of numbers by powers of 2
multiply | x 16 | x 8 | x 4 | x 2 |
---|---|---|---|---|
shift | Left 4 | Left 3 | Left 2 | Left 1 |
divide | / 2 | / 4 | / 8 |
---|---|---|---|
shift | Right 1 | Right 2 | Right 3 |
Example: Apply shift operator to 11012 (1310)
Shift | Result | denary |
---|---|---|
Left 1 | 110102 | 1310 x 210 =2610 |
Left 2 | 1101002 | 1310 x 410 =5210 |
Right 1 | 1102 | 1310 /210 =610 |
Note that odd numbers are rounded down to the nearest integer when the right shift operator is applied.
Learning Videos
For more information click on the tab below to watch a video about the lesson.
Click for video - Adding three 8-bit binary integers
Click for video - Binary shifts
Questions
-
Apply a right shift of one binary place on the following byte.
1 0 0 1 1 1 1 0 Convert the original and shifted binary numbers into decimal What is the effect of the logical binary shift?
0 1 0 0 1 1 1 1 158 and 79
Division by two.
-
Apply a right shift of one binary place on the following byte.
0 1 0 1 1 0 1 0 Convert the original and shifted binary numbers into decimal What is the effect of the logical binary shift?
1 0 1 1 0 1 0 0 90 and 180
Multiply by two.
-
Add 00100111 to 00101010. You should include your working.
0 1 0 1 0 0 0 1
-
Add 00100111 to 00111010. You should include your working.
0 1 1 0 0 0 0 1
-
Show the result of adding the following three binary numbers. 110011 10111 101
1 0 0 1 1 1 1
Go Back