All data is represented as binary digits, whether it is numbers, text, images or sound. Calculations are also done in binary.
Part ofComputer ScienceComputer systems
BinaryclosebinaryA number system that contains two symbols, 0 and 1. Also known as base 2. numbers are multiplied and divided through a process called shifting.
To multiply a number, a binary shift moves all the digits in the binary number along to the left and fills the gaps after the shift with 0:
Example - 1100 (denaryclosedenaryThe number system most commonly used by people. It contains 10 unique digits 0 to 9. Also known as decimal or base 10. 12) × 2
Result: shifting one place to the left gives 11000 (24 denary)
Example - 10110 (denary 22) × 4
Result: shifting two places to the left gives 1011000 (denary 88)
To divide a number, a binary shift moves all the digits in the binary number along to the right:
Example - 100100 (denary 36) ÷ 2
Result: shifting one place to the right gives 10010 (denary 18)
Example - 1111 (denary 15) ÷ 2
Result: shifting two places to the right gives 111 (denary 7).
Note - 15 ÷ 2 = 7.5. However, in this form of binary, there are no decimals, and so the decimal is discarded.
Example - 110110 (denary 54) ÷ 4
Result: shifting two places to the right gives 1101 (denary 13)
This video can not be played
Multiplying and dividing binary numbers using binary shifts