Can you implement bit shift using only logic operations: and, or, not, xor ?
Can you use bitshift in a bitblt?
views:
38answers:
2
A:
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.
jdv
2010-09-06 06:12:33
A:
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.
Andre Holzner
2010-09-06 06:14:05