Computer Science GCES OCR
-
Cpu Architecture Performance And Embedded Systems Ocr5 主题
-
Primary And Secondary Storage Ocr6 主题
-
Data Storage And Compression Ocr12 主题
-
Units Of Data Storage Ocr
-
Processing Binary Data Ocr
-
Data Capacity And Calculating Capacity Requirements Ocr
-
Converting Between Denary And Binary Ocr
-
Binary Addition Ocr
-
Converting Between Denary And Hexadecimal Ocr
-
Converting Between Binary And Hexadecimal Ocr
-
Binary Shifts Ocr
-
Representing Characters Ocr
-
Representing Images Ocr
-
Representing Sound Ocr
-
Compression Ocr
-
Units Of Data Storage Ocr
-
Networks And Topologies Ocr6 主题
-
Wired And Wireless Networks Protocols And Layers Ocr6 主题
-
Identifying And Preventing Threats To Computer Systems And Networks Ocr2 主题
-
Operating Systems And Utility Software Ocr2 主题
-
Ethical Legal Cultural And Environmental Impact Ocr2 主题
-
Computational Thinking Searching And Sorting Algorithms Ocr3 主题
-
Designing Creating And Refining Algorithms Ocr5 主题
-
Programming Fundamentals And Data Types Ocr5 主题
-
Additional Programming Techniques Ocr7 主题
-
Defensive Design And Testing Ocr6 主题
-
Boolean Logic Diagrams Ocr2 主题
-
Programming Languages And Integrated Development Environments Ides Ocr3 主题
-
The Exam Papers Ocr2 主题
-
Structuring Your Responses Ocr3 主题
Binary Shifts Ocr
Exam code:J277
Binary Shifts
What is a binary shift?
-
A binary shift is how a computer system performs basic multiplication and division
-
Binary digits are moved left or right a set number of times
-
A left shift multiplies a binary number by 2 (x2)
-
A right shift divides a binary number by 2 (/2)
-
A shift can move more than one place at a time, the principle remains the same
-
A left shift of 2 places would multiply the original binary number by 4 (x4)
-
Binary shifts can cause a loss of precision by discarding bits, which can lead to changes in the numerical value
How do you perform a left shift of 1?
-
Here is the binary representation of the denary number 40
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|---|---|---|---|---|---|---|---|
|
0 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
-
To perform a left binary shift of 1, we move each bit 1 place to the left
-
The digit in the 128 column will move left causing an overflow error
-
The 1 column becomes empty so is filled with a 0
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|
|---|---|---|---|---|---|---|---|---|
|
|
0 |
1 |
0 |
1 |
0 |
0 |
0 |
= 40 |
|
0 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
= 80 |
-
The original binary representation of denary 40 (32+8) has multiplied by 2 and became 80 (64+16)
How do you perform a left shift of 2?
-
Here is the binary representation of the denary number 28
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|---|---|---|---|---|---|---|---|
|
0 |
0 |
0 |
1 |
1 |
1 |
0 |
0 |
-
To perform a left binary shift of 2, we move each bit 2 place to the left
-
The digit in the 128 and 64 column will move left causing an overflow error
-
The 1 and 2 column become empty so are filled with a 0
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|
|---|---|---|---|---|---|---|---|---|
|
|
|
0 |
1 |
1 |
1 |
0 |
0 |
= 28 |
|
0 |
1 |
1 |
1 |
0 |
0 |
0 |
0 |
= 112 |
-
The original binary representation of denary 28 (16+8+4) has multiplied by 4 and became 112 (64+32+16)
How do you perform a right shift of 1?
-
Here is the binary representation of the denary number 40
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|---|---|---|---|---|---|---|---|
|
0 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
-
To perform a right binary shift of 1, we move each bit 1 place to the right
-
The digit in the 1 column will move right causing an underflow error
-
The 128 column becomes empty so is filled with a 0
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|
|---|---|---|---|---|---|---|---|---|
|
0 |
0 |
1 |
0 |
1 |
0 |
0 |
|
= 40 |
|
0 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
= 20 |
-
The original binary representation of denary 40 (32+8) has divided by 2 and became 20 (16+4)
How do you perform a right shift of 2?
-
Here is the binary representation of the denary number 200
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|---|---|---|---|---|---|---|---|
|
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
-
To perform a right binary shift of 2, we move each bit 2 places to the right
-
The digits in the 1 and 2 columns will move right causing an underflow error
-
The 128 and 64 columns become empty so are filled with a 0
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|---|
Responses