Logic circuits

What happens to the value of a binary number when it is shifted left by one bit (assuming no overflow)?

  1. AIt doubles
  2. BIt halves
  3. CIt increases by 1
Show answer and explanation

Answer: A. It doubles

Each binary place has twice the weight of the one below, so shifting left one bit (filling with 0) doubles the value and shifting right halves it (truncating); n bits multiply or divide by 2ⁿ. Because shifters are far smaller and faster than multipliers or dividers, optimizing compilers replace integer x × 8 with x << 3. For signed numbers, right shifts use arithmetic shifts that replicate the sign bit. For negative odd numbers the result rounds toward negative infinity, so −7 becomes −4, which differs from the −3 given by division truncated toward zero.

Related calculators

Books on Logic circuits Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

More Logic circuits questions

  1. When an even parity bit is added to the 7-bit data 1011001, what is the parity bit?
  2. When is the output of a two-input NOR gate 1?
  3. What is the simplified result of the expression A + A·B?
  4. What is an advantage of a synchronous circuit, in which all flip-flops operate on a common clock?
  5. In a synchronous circuit, what determines the maximum clock frequency at which it can operate?

Comparisons in this topic