Naveen
Naveen

Reputation: 6008

how are bitshift, bitrotate implemented in circuit?

Can you implement bit shift using only logic operations: and, or, not, xor ?
Can you use bitshift in a bitblt?

Upvotes: 1

Views: 3506

Answers (2)

Andre Holzner
Andre Holzner

Reputation: 18675

To implement bitshifts/rotates in circuits: you can build registers from an array of Flip Flops which in turn you can build e.g. from NAND gates.

In order to implement bit-shifts/rotates you would wire two such registers (or feed back to the same register) by wiring the output of bit 0 to the input of bit 1 etc.

The contents are then transferred on e.g. the next clock rising edge from one array of flip-flops to the other.

Upvotes: 2

user180326
user180326

Reputation:

You can emulate a left shift with addition a + a. The result of an and/or/not/xor do not depend upon adjacent bits, so you can't use them for bitshifts. In circuit, i'd expect they are hard-coded... You can use bit-shifting for fast hardware multiplication anyway.

Upvotes: 1

Related Questions