August 2024
Beginner
216 pages
5h 24m
English
Binary shifts are a way of multiplying or dividing binary numbers.
To multiply a number, shift all the digits in the binary number along to the left and fill the gaps after the shift with a 0. This is also known as a logical shift and is best used on unsigned binary numbers.
Lets take a look at an example:
To multiply by two, shift all digits one place to the left.
For example, 000100112 x 102 = 001001102 (in decimal: 19 x 2 = 38)

To multiply by four, shift all digits two places to the left. To multiply by eight, shift all binary digits three places to the left.
To divide a number by two, shift all the digits in the binary number ...
Read now
Unlock full access