数字电路 全加器
- 格式:doc
- 大小:217.50 KB
- 文档页数:11
武汉理工大学《基础强化训练》课程设计说明书
1 目录
摘要 ....................................................................................................................................................................................................2
ABSTRACT..........................................................................................................................................................................................3
数字电路-全加器............................................................................................................................................................................4
1 一位全加器的设计.....................................................................................................................................................................4
1.1 一位全加器的原理 ............................................................................................................................................................4
1.2 一位全加器的逻辑电路图 ...............................................................................................................................................4
1.3用SIMULINK创建全加器电路模块 ...................................................................................................................................5
1.4 一位全加器的子系统图 ...................................................................................................................................................5
2.四位全加器的设计.....................................................................................................................................................................6
2.1 四位全加器电路图 ............................................................................................................................................................6
2.2 仿真波形及与理论值的比较...........................................................................................................................................7
小结与体会.................................................................................................................................................................................... 10
参考文献 ........................................................................................................................................................................................ 11
武汉理工大学《基础强化训练》课程设计说明书
2
摘要
Simulink是从底层开发的一个完整的仿真环境和图形界面,它把MATLAB的许多功能都设计成一个个直观的功能模块,把需要的功能模块连接起来就可以实现所需要的仿真功能。Simulink仿真应用于数字电路、数字信号处理、通信仿真、电力系统仿真、宇航仿真等领域。由于数字系统中高低电平分别用0和1表示,因此数字电路问题往往可以转化为一个数字上的逻辑问题。MATLAB提供了逻辑运算模块和各种触发器模块,可以方便的进行数字电路的设计和仿真。借助于组合电路仿真常用模块Logic and Bit Operations子库中的Local Operator模块,将其拖到所建的untitled窗口中,然后鼠标左键双击该模块弹出的Block Parameters/Logical Operator对话框,按Operator栏后的黑三角来选择所需要的门电路标识符,如:AND、OR、NAND、NOR、XOR、NOT中的一个,并依次设置所需的输入、输出端子个数,之后按OK键确定。利用这些基本门电路组成全加器逻辑电路。
关键词:MATLAB Simulink 仿真 全加器
武汉理工大学《基础强化训练》课程设计说明书
3 Abstract
From the bottom of the development of Simulink a complete simulation environment and
graphic interface, it put many of the functions are design MATLAB as an intuitive function
module, the need to connect the function module can be achieved need simulation function.
Simulink used in the digital circuit, digital signal processing, communication simulation, electric
power system simulation, the space simulation, etc. As digital system in high and low level
respectively with 0 and 1 said, so the digital circuit problems are often can be converted into a
number of problems on logic. MATLAB provides logic operation module and various trigger
module, easy to digital circuit design and simulation. Combined with the simulation module
circuit commonly used Logic and Bit Operations son in the library Local Operator module, will
drag the building untitled window, and then the mouse left click on the module of the pop-up
Block Parameters/Logical Operator dialog box, press the black triangle Operator bar to select the
desired a gate identifier, such as: and, OR, NAND, NOR, XOR, NOT of a, and were set to the
desired input and output terminals number, then press OK sure. Using these basic of gate adder
logic circuit.
Keywords: MATLAB Simulink QuanJia device
武汉理工大学《基础强化训练》课程设计说明书
4 数字电路-全加器
1 一位全加器的设计
1.1 一位全加器的原理
所谓全加器,就是带进位输入和进位输出的加法器。1位全加器有3个输入,分别是加数A、B和来自低位的进位C;还有两个输出,分别是和数SUM以及向高位进位D。根据全加运算的逻辑关系,可列出一位全加器的真值表,如表1所示。
表1 一位全加器的真值表
列出SUM和D的最小与或表达式:
SUM=CBACBAABCCBA
D=AC+BC+CA
1.2 一位全加器的逻辑电路图
对SUM进行一次变换的SUM=A⊕B⊕D这样仅用一个三输入异或门就实现了SUM的电路。基于逻辑表达式得到如下逻辑图(图1)。
A B C SUM D
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