串行加法器和并行加法器_N位并行加法器(4位二进制加法器和减法器)

串行加法器和并行加法器

Till now, we have already read (in the previous articles) about designing and uses of the basic form of adders and subtractors such as Half Adder, Full Adder, Half Subtractor, and Full Subtractor. In this article, we are going to learn about the more advanced concept of adders and subtractors and their design and uses using block diagrams and logic circuit diagrams.

到目前为止,我们已经阅读(在之前的文章中)有关加法器和减法器基本形式的设计和使用,例如Half Adder,Full Adder,Half Subtractor和Full Subtractor。 在本文中,我们将使用框图和逻辑电路图来学习加法器和减法器的更高级概念及其设计和使用。

并行二进制加法器 (Parallel Binary Adder)

As, we already know, a full adder was used to add two 1-bit binary numbers and the additional carry bit (Cin). But, to add two n-bit binary numbers, we will require n-number of full adders. The addition of LSB bits can be done by using any of half-adder or a full-adder with Cin terminal grounded, but in practical parallel adders, we use a full-adder at the least significant stage also to facilitate cascading. The carry-out of each full-adder is also connected to the carry-in of the next full-adder in the higher-order. A parallel adder is used to add two numbers in parallel form and to produce the sum bits as parallel outputs. In two numbers, one is addend and the other is augend and both are added parallelly to get the sum.

正如我们已经知道的那样,使用了全加法器将两个1位二进制数和另一个进位( C in )相加。 但是,要添加两个n位二进制数,我们将需要n个完全加法器。 LSB位的加法可以通过端子接地时使用半加法器或全加法器中的任何一个来完成,但在实际的并行加法器中,我们在最低有效级使用全加法器也有助于级联。 每个全加器的进位也连接到更高阶的下一个全加器的进位。 并行加法器用于以并行形式将两个数字相加,并产生总和位作为并行输出。 在两个数字中, 一个是加数,另一个是加数,并且两个都被并行相加以获得总和。

Two n+1-bit binary number A and B of the form,

两个n + 1位二进制数A和B的形式,

    A:      An An-1 An-2 ... A3 A2 A1 A0	    (Augend)
    B:      Bn Bn-1 Bn-2 ... B3 B2 B1 B0	    (Addend)

can be added as,

可以添加为

N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 1

Block diagram and Logic circuit diagram of a Parallel Binary adder can be given as,

并行二进制加法器的框图和逻辑电路图可以表示为:

N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 2
N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 3

4位二进制加法器 (4-bit Binary Adder)

From the above-provided logic, we need 4 full adders connected together to add 4-bit binary numbers. For 4-bit binary numbers A and B of the form,

根据上面提供的逻辑,我们需要将4个全加器连接在一起以添加4位二进制数。 对于格式为4和2的二进制数A和B,

A: A3 A2 A1 A0 and B: B3 B2 B1 B0, its sum can be obtained as,

A: A 3 A 2 A 1 A 0B: B 3 B 2 B 1 B 0 ,其总和可以得出,

N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 4

Block diagram and Logic circuit diagram of a 4-bit Binary adder can be given as,

4位二进制加法器的框图和逻辑电路图可以表示为:

N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 5
N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 6

4位二进制减法器 (4-Bit Binary Subtractor)

We already know that two numbers A (Minuend) and B (Subtrahend) can be subtracted using 2s complement method, where,

我们已经知道,可以使用2s补码方法减去两个数字A (被减数)和B (被减数),其中,

    A – B   = A + 2s complement of B
            = A + 1s complement of B + 1

Thus, 4-bit binary numbers A and B can subtract as,

因此,4位二进制数A和B可以减去,

N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 7

And the logic circuit for the same can be drawn as,

逻辑电路可以画为

N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 8

Parallel Adder/Subtractor using a single circuit can be also designed using a Mod bit (M), where mod bit M decides whether the circuit will act as an adder or a subtractor. When M=0, then the circuit acts as an adder and when M=1, then the circuit acts as a subtractor. The circuit for the same can be drawn as,

也可以使用Mod位( M )设计使用单个电路的并行加法器/减法器,其中Mod位M决定该电路将充当加法器还是减法器。 当M = 0时 ,电路充当加法器,而当M = 1时 ,电路充当减法器。 相同的电路可以画成,

N-bit Parallel Adders (4-bit Binary Adder and Subtractor) | 9
    When M=0, 
    output  = A3 A2 A1 A0 + B3 B2 B1 B0 + Cin          [Since, A0 = A]
            = A3 A2 A1 A0 + B3 B2 B1 B0 + 0
            = A + B

Thus, circuit acts as a 4-bit binary adder.

因此,电路用作4位二进制加法器。

    When M=1, 
    output  = A3 A2 A1 A0 + B3 B2 B1 B0 + Cin
            = A3 A2 A1 A0 + B3 B2 B1 B0 + 1
            = A + B + 1
            = A – B

Thus, circuit acts as a 4-bit binary subtractor

因此,电路充当4位二进制减法器

翻译自: https://www.includehelp.com/basics/n-bit-parallel-adders-4-bit-binary-adder-and-subtractor.aspx

串行加法器和并行加法器

  • 11
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 以下是两十进制加法器的仿真电路图: ![两十进制加法器的仿真电路图](https://i.imgur.com/hVwV6K2.png) 其中,D1-D10 是输入端口,S1-S11 是输出端口。Cin 是进输入信号,Cout 是进输出信号。由于是十进制加法器,因此需要使用 BCD 码进行运算。在电路图中,使用了多个 4 二进制加法器和 BCD 转换器来实现两十进制加法器。 ### 回答2: 二十进制加法器仿真电路图主要包括两个部分:二进制加法器和BCD码转换器。 首先是二进制加法器部分。该部分主要实现了两个二进制数相加的功能。它由两个全加器和一个半加器组成。全加器用于处理两个的相加并产生相应的进,半加器用于处理两个的相加但不考虑进二进制加法器采用级联的方式,将进输出连接到下一个的进输入,实现了不同数的相加。具体电路图如下: ``` +-------------------+ A1 -| | B1 -| Full Adder | SUM1 C0 -| |----[] +---------+---------+ | | +---------+---------+ A2 -| | B2 -| Full Adder | SUM2 CO -| |----[] +---------+---------+ | | +---------+---------+ A3 -| | B3 -| Half Adder | SUM3 CO -| |----[] +---------+---------+ ``` 接下来是BCD码转换器部分。BCD码将二进制数转换为十进制数。该部分由逻辑门组成,根据输入的四二进制数,经过逻辑计算后输出对应的十进制数。具体电路图如下: ``` +-------------------+ In1 -| | In2 -| BCD Converter | Out1 In3 -| |----[] In4 -| | +---------+---------+ | | +---------+---------+ In5 -| | In6 -| BCD Converter | Out2 In7 -| |----[] In8 -| | +---------+---------+ ``` 以上是二十进制加法器仿真电路图的基本设计。实际制作时还需要根据具体的器件选型和信号连接等进行调整和完善。 ### 回答3: 二十进制加法器是一种电路,用于将两个十进制数相加。下面是一个简单的二十进制加法器的仿真电路图。 首先,我们需要两个两的十进制数作为输入。每个输入被分为两,用A1和A0表示第一个输入的两数字,用B1和B0表示第二个输入的两数字。这四个输入被连接到一个AND门上,以确保输入都为1时电路才能工作。 接下来,我们需要两个四二进制加法器来执行加法操作。对于每个输入,我们需要一个全加器。全加器的输出由两个输入和一个进决定。我们可以使用异或门来实现两个输入的加法,使用与门来实现进的计算。 在本例中,我们使用两个全加器,分别用来计算个数和十数的加法。对于个数的加法,我们将A0和B0分别作为输入,然后将得到的和作为输出。对于十数的加法,我们将A1,B1和个数的进作为输入,然后将得到的和作为输出。 最后,我们将个数的和和十数的和作为输出。输出为两,用S1和S0表示。这两个输出连接到一个OR门上,以确保至少有一个输出为1时电路才能工作。 这就是一个简单的二十进制加法器的仿真电路图。通过输入两个十进制数,电路可以计算它们的和并输出结果。这种加法器可以在计算机等数字系统中使用,并且是实现复杂算术运算的基础。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值