# Binary Shifters using Logic Gates

A binary shift is a binary operation that consists of shifting all the digit of a binary number either to the left or to the right by a fixed amount. Binary shifts can be used to multiply a number by a power of 2 (left shift) or to divide a number by a power of 2 (right shift).

#### Binary Left Shift

A binary left shift is used to multiply a binary number by two. It consists of shifting all the binary digits to the left by 1 digit and adding an extra digit at the end with a value of 0.

#### Binary Right Shift

A binary right shift is used to divide a binary number by two. It consists of shifting all the binary digits to the right by 1 digit and adding an extra digit at the beginning (to the left) with a value of 0.

#### 8-bit Binary Shifters

A binary shifter is a logic gates circuit that takes a takes a binary input (A) and performs either a left shift or a right shift and outputs the result (S). On the diagram below, input D is used to decide whether a left shift (D=0) or a right shift (D=1) is applied.

Did you like this challenge?

Click on a star to rate it!

Average rating 4.5 / 5. Vote count: 41

No votes so far! Be the first to rate this post.

As you found this challenge interesting...