加法器 | Adder
概述 | Overview
加法器是一种用于计算两个或多个二进制数的和的数字电路。它是计算机和数字系统中的基本组件。加法器可以分为两类:半加器和全加器。
An adder is a digital circuit used to calculate the sum of two or more binary numbers. It is a fundamental component in computers and digital systems. Adders can be classified into two categories: half adders and full adders.
半加器 | Half Adder
定义 | Definition
半加器是一种能够计算两个二进制位的和及其进位的电路。它有两个输入和两个输出,分别是和(Sum)和进位(Carry)。
A half adder is a circuit capable of calculating the sum and carry of two binary bits. It has two inputs and two outputs, which are the sum and the carry, respectively.
真值表 | Truth Table
输入 A | 输入 B | 和(Sum) | 进位(Carry) |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
Input A | Input B | Sum | Carry |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
逻辑表达式 | Logical Expression
和(Sum):
进位(Carry):
Sum:
Carry:
全加器 | Full Adder
定义 | Definition
全加器是一种计算三个二进制位的和及其进位的电路。它有三个输入:两个操作数和一个来自低位的进位输入,输出包括和(Sum)和进位(Carry)。
A full adder is a circuit that calculates the sum and carry of three binary bits. It has three inputs: two operands and a carry input from the lower bit, with outputs including the sum and carry.
真值表 | Truth Table
输入 A | 输入 B | 进位输入 Cin | 和(Sum) | 进位(Carry) |
---|---|---|---|---|
0 | 0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 | 0 |
0 | 1 | 0 | 1 | 0 |
0 | 1 | 1 | 0 | 1 |
1 | 0 | 0 | 1 | 0 |
1 | 0 | 1 | 0 | 1 |
1 | 1 | 0 | 0 | 1 |
1 | 1 | 1 | 1 | 1 |
Input A | Input B | Carry In (Cin) | Sum | Carry |
---|---|---|---|---|
0 | 0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 | 0 |
0 | 1 | 0 | 1 | 0 |
0 | 1 | 1 | 0 | 1 |
1 | 0 | 0 | 1 | 0 |
1 | 0 | 1 | 0 | 1 |
1 | 1 | 0 | 0 | 1 |
1 | 1 | 1 | 1 | 1 |
逻辑表达式 | Logical Expression
和:
进位:
Sum:
Carry:
应用 | Applications
加法器是计算机算术逻辑单元(ALU)的核心组件之一,用于执行基本的算术运算,如加法、减法、乘法和除法。它们还用于各种数字信号处理和其他应用中
Adders are core components of the arithmetic logic unit (ALU) in computers, used to perform basic arithmetic operations such as addition, subtraction, multiplication, and division. They are also used in various digital signal processing and other applications