bitshift、bitrotate在电路中是如何实现的?

发布于 2024-09-17 07:11:06 字数 152 浏览 2 评论 0原文

您可以仅使用逻辑运算来实现位移位:与、或、非、异或吗?
您可以在 bitblt

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半仙 2024-09-24 07:11:06

要在电路中实现位移/旋转:您可以从 触发器数组构建寄存器 反过来,您可以从 NAND 门构建。

为了实现位移/旋转,您可以通过将位 0 ​​的输出连接到位 1 的输入等来连接两个这样的寄存器(或反馈到同一个寄存器)。

然后内容会在下一个时钟上升沿传输从一个触发器阵列到另一个触发器阵列的边缘。

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.

榕城若虚 2024-09-24 07:11:06

您可以通过添加 a + 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文