例:试用四位二进制加法器74283构成可控的加法、减法器(允许附加
实验四 四位二进制全加器

3.实验设备及材料
2.SAC-DS4数字逻辑电路实验箱 1个
3.万用表1块
4.74LS283 四位二进制全加器1片
4.实验方法步骤及注意事项
用开关按表8-1设置输入A1-A4、B1-B4、C0的状态,借助指示灯观测输出F1-F4、C4的状态,并记入表8-1中。
表8-1
输 入
输 出
A4A3A2A1
本科学生实验报告
学号姓名
学院物理与电子信息学院专业、班级10物理A
实验课程名称数字电路技术试验
教师及职称张超(讲师)
开课学期2012至2013学年上学期
填报时间2012年09月日
云南师范大学教务处编印
实验序号
4
实验名称
四位二进制全加器
实验时间
2012.10.9
实验室
同析3幢215
一.实验预习
1.实验目的
2、74LS283四位全加器特性函数
教师评语及评分:
签名:年月日
B4B3B2B1
C0
F4F3F2F1
C4
0 0 0 1
0 0 0 1
1
0 1 0 0
0 0 1 1
0
1 0 0 0
0 1 1 1
1
1 0 0 1
1 0 0 0
0
1 0 1 1
0 1 0 1
1
1 1 0 0
0 1 1 0
0
1 1 0 1
0 1 0 0
1
1 1 1 1
1 1 1 1
0
利用开关输入BCD码,借助指示灯观测输出的余3码,填入表8-2中。
0 1 0 1
0 0 1 1
0 1 1 0
可控加减法电路设计实验报告

可控加减法电路设计实验报告一、实验目的。
1.了解四位二进制数运算的基本原理,制定设计方案。
2.利用ISE软件进行可编程逻辑器件设计,完成逻辑仿真功能。
3.使用编译器将设计实现,下载到BASYS2实验板上进行调试和验证所设计的四位二进制数的运算。
二、实验器材。
1.Pentium—Ⅲ计算机一台;2.BASYS2 实验板一只;三、实验方案。
1.基本功能。
实现了两个四位二进制数的加减法运算,能够在输出端得出结果.2.清零功能。
利用一个微动开关,在逻辑程序中表示出当按下微动开关后两个操作数都变为零。
再调用以前的加法程序,即可实现输出结果清零。
3.用数码管显示。
编写程序,将数值转换为七段显示器显示。
将运算结果输送到数码管中。
值得注意的是四个数码管要显示不同的数字,就需要利用到人的视觉误差,做一些短暂的延时。
4.溢出显示。
本实验中,设计的是一个无符号数加减法器,因而其共有两种溢出情况一,减法时,减数大于被减数,针对这种情况可以利用比较大小进行溢出判断;二,加法时,被操作数之和大于15。
判断进位,如果进位为1则显示溢出,若反之,则不显示。
四、实验原理图。
五、实验模块说明及部分代码。
1.add1部分。
将输入的两个操作数相加并判断大小。
相加结果放在led中,进位放在carry中。
led[0]=num1[0]^num2[0];carry[0]=num1[0]&num2[0];led[1]=num1[1]^num2[1]^carry[0];carry[1]=(num1[1]&num2[1])|(carry[0]&(num1[1]^num2[1]));led[2]=num1[2]^num2[2]^carry[1];carry[2]=(num1[2]&num2[2])|(carry[1]&(num1[2]^num2[2]));led[3]=num1[3]^num2[3]^carry[2];if(add)begincarry[3]=(num1[3]&num2[3])|(carry[2]&(num1[3]^num2[3]));endif(sub)beginif(compare)carry[3]=1;elsecarry[3]=(num1[3]&num2[3])|(carry[2]&(num1[3]^num2[3]))&(~sub); 2.seg7ment。
74283 TTL 4位二进制全加器

© 2000 Fairchild Semiconductor Corporation DS006421August 1986Revised March 2000DM74LS283 4-Bit Binary Adder with Fast CarryDM74LS2834-Bit Binary Adder with Fast CarryGeneral DescriptionThese full adders perform the addition of two 4-bit binary numbers. The sum (∑) outputs are provided for each bit and the resultant carry (C4) is obtained from the fourth bit.These adders feature full internal look ahead across all four bits. This provides the system designer with partial look-ahead performance at the economy and reduced package count of a ripple-carry implementation.The adder logic, including the carry, is implemented in its true form meaning that the end-around carry can be accomplished without the need for logic or level inversion.Featuress Full-carry look-ahead across the four bitss Systems achieve partial look-ahead performance with the economy of ripple carry s Typical add timesTwo 8-bit words25 nsTwo 16-bit words 45 nss Typical power dissipation per 4-bit adder 95 mWOrdering Code:Devices also available in T ape and Reel. Specify by appending the suffix letter “X” to the ordering code.Connection DiagramOrder Number Package NumberPackage DescriptionDM74LS283M M16A 16-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-012, 0.150 Narrow DM74LS283NN16E16-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide 2D M 74L S 283Function TableH= HIGH Level, L = LOW LevelInput conditions at A1, B1, A2, B2, and C0 are used to determine outputs ∑1 and ∑2 and the value of the internal carry C2. The values at C2, A3, B3, A4, and B4 are then used to determine outputs ∑3, ∑4, and C4.Logic DiagramDM74LS283Absolute Maximum Ratings (Note 1)Note 1: The “Absolute Maximum Ratings” are those values beyond which the safety of the device cannot be guaranteed. The device should not be operated at these limits. The parametric values defined in the Electrical Characteristics tables are not guaranteed at the absolute maximum ratings.The “Recommended Operating Conditions” table will define the conditions for actual device operation.Recommended Operating ConditionsElectrical Characteristicsover recommended operating free air temperature range (unless otherwise noted)Note 2: All typicals are at V CC = 5V, T A = 25°C.Note 3: Not more than one output should be shorted at a time, and the duration should not exceed one second.Note 4: I CC1 is measured with all outputs OPEN, all B inputs LOW and all other inputs at 4.5V, or all inputs at 4.5V.Note 5: I CC2 is measured with all outputs OPEN and all inputs GROUNDED.Supply Voltage 7V Input Voltage7VOperating Free Air Temperature Range 0°C to +70°C Storage Temperature Range−65°C to +150°CSymbol ParameterMin Nom Max Units V CC Supply Voltage4.7555.25V V IH HIGH Level Input Voltage 2V V IL LOW Level Input Voltage 0.8V I OH HIGH Level Output Current −0.4mA I OL LOW Level Output Current 8mA T AFree Air Operating Temperature70°CSymbol ParameterConditionsMinTyp Max Units (Note 2)V I Input Clamp Voltage V CC = Min, I I = −18 mA −1.5V V OH HIGH Level V CC = Min, I OH = Max 2.73.4VOutput Voltage V IL = Max, V IH = Min V OLLOW Level V CC = Min, I OL = Max0.350.5Output VoltageV IL = Max, V IH = Min VI OL = 4 mA, V CC = Min 0.250.4I I Input Current @ Max V CC = Max A, B 0.2mA Input Voltage V I = 7V C00.1I IH HIGH Level V CC = Max A, B 40µA Input Current V I = 2.7V C020I IL LOW Level V CC = MaxA, B −0.8mA Input CurrentV I = 0.4V C0−0.4I OS Short Circuit Output Current V CC = Max −20−100mA I CC1Supply Current V CC = Max (Note 4)1934mA I CC2Supply CurrentV CC = Max (Note 5)2239mA 4D M 74L S 283Switching Characteristicsat V CC = 5V and T A = 25°CFrom (Input)R L = 2 k ΩSymbol ParameterTo (Output)C L = 15 pF C L = 50 pF UnitsMinMax MinMax t PLH Propagation Delay Time C0 to ∑1, ∑22428ns LOW-to-HIGH Level Output t PHL Propagation Delay Time C0 to ∑1, ∑22430ns HIGH-to-LOW Level Output t PLH Propagation Delay Time C0 to ∑32428ns LOW-to-HIGH Level Output t PHL Propagation Delay Time C0 to ∑32430ns HIGH-to-LOW Level Output t PLH Propagation Delay Time C0 to ∑42428ns LOW-to-HIGH Level Output t PHL Propagation Delay Time C0 to ∑42430ns HIGH-to-LOW Level Output t PLH Propagation Delay Time A i or B i to ∑i 2428ns LOW-to-HIGH Level Output t PHL Propagation Delay Time A i or B i to ∑i 2430ns HIGH-to-LOW Level Output t PLH Propagation Delay Time C0 to C41724ns LOW-to-HIGH Level Output t PHL Propagation Delay Time C0 to C41725ns HIGH-to-LOW Level Output t PLH Propagation Delay Time A i or B i to C41724ns LOW-to-HIGH Level Output t PHLPropagation Delay Time A i or B i to C41726ns HIGH-to-LOW Level OutputDM74LS283Physical Dimensions inches (millimeters) unless otherwise noted16-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-012, 0.150 NarrowPackage Number M16A6D M 74L S 283 4-B i t B i n a r y A d d e r w i t h F a s t C a r r yPhysical Dimensions inches (millimeters) unless otherwise noted (Continued)16-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 WidePackage Number N16EFairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and Fairchild reserves the right at any time without notice to change said circuitry and specifications.LIFE SUPPORT POLICYFAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILD SEMICONDUCTOR CORPORATION. As used herein:1.Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and (c) whose failure to perform when properly used in accordance with instructions for use provided in the labeling, can be rea-sonably expected to result in a significant injury to the user. 2. A critical component in any component of a life support device or system whose failure to perform can be rea-sonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness.。
组合逻辑电路课后答案

组合逻辑电路课后答案第4章[题].分析图电路的逻辑功能,写出输出的逻辑函数式,列出真值表,说明电路逻辑功能的特点。
图P4.1B YAP 56P P =图解:(1)逻辑表达式()()()5623442344232323232323Y P P P P P CP P P P CP P P C CP P P P C C P P P P C P PC ===+=+=++=+ 2311P P BP AP BABAAB AB AB ===+ ()()()2323Y P P C P P CAB AB C AB ABC AB AB C AB AB CABC ABC ABC ABC=+=+++=+++=+++(2)真值表(3)功能从真值表看出,这是⼀个三变量的奇偶检测电路,当输⼊变量中有偶数个1和全为0时,Y =1,否则Y=0。
[题] 分析图电路的逻辑功能,写出Y 1、、Y 2的逻辑函数式,列出真值表,指出电路完成什么逻辑功能。
图P4.3B1Y 2[解]解: 2Y AB BC AC =++12Y ABC A B C Y ABC A B C AB BC AC ABC ABC ABC ABC =+++=+++++=+++()())由真值表可知:、C 为加数、被加数和低位的进位,Y 1为“和”,Y 2为“进位”。
[题] 图是对⼗进制数9求补的集成电路CC14561的逻辑图,写出当COMP=1、Z=0、和COMP=0、Z=0时,Y 1~Y 4的逻辑式,列出真值表。
图P4.4[解](1)COMP=1、Z=0时,TG1、TG3、TG5导通,TG2、TG4、TG6关断。
,(2)COMP=0、Z=0时,Y1=A1,Y2=A2,Y3=A3,Y4=A4。
、COMP=1、Z=0时的真值表、Z=0的真值表从略。
[题] ⽤与⾮门设计四变量的多数表决电路。
当输⼊变量A、B、C、D有3个或3个以上为1时输出为1,输⼊为其他状态时输出为0。
[解] 题的真值表如表所⽰,逻辑图如图(b)所⽰。
四位二进制数可控加减法 上海交通大学电子技术实验大作业

《四位二进制数可控加减法》实验报告实验名称: 四位二进制数可控加减法姓名:学号:班级:目录一、实验方案 (3)二、设计思路................................................................................ 错误!未定义书签。
三、程序代码................................................................................ 错误!未定义书签。
四、调试问题 (6)五、心得感想 (7)一、实验方案1)基本功能实现两个四位二进制数的加减法运算,能够在led灯和数码管显示出结果。
2)清零功能利用一个微动开关,当微动开关按下时结果清零显示。
3)数码管显示将结果转换为七段显示器显示。
将运算结果输送到数码管中。
利用到人的视觉误差和短暂延时显示四位运算结果。
4)溢出问题若有溢出,则数码管显示“E”。
二、设计思路基本功能中分为连个模块,主模块用来运算加减法以及记录溢出和结果,子模块用来进行七段数码管的显示。
扩展功能中数码管显示要利用暂留现象,因此利用时钟clk来进行设计。
三、程序代码module show_sub(input [1:0]num,output reg [6:0] a_to_g );always @(*)case(num)2'b00: a_to_g=7'b1000000;2'b01: a_to_g=7'b1111001;2'b10: a_to_g=7'b1111111;2'b11: a_to_g=7'b0000110;default: a_to_g=7'b0000110;endcaseendmodulemodule show_top(input clk,clr,input wire [7:0] sw,input plus,sub,output wire [6:0] a_to_g,output reg [3:0] an,output reg [3:0] led );reg [15:0] clk_cnt;wire [1:0]s;reg [3:0] result; //运算结果reg [1:0] res;reg flag; //溢出标志wire [3:0] data1;wire [3:0] data2;assign data1=sw[7:4];assign data2=sw[3:0];assign s=clk_cnt[15:14];always @(posedge clk)beginclk_cnt=clk_cnt+1;endalways@(posedge plus or posedge sub or posedge clr)。
09.11分析电路图的逻辑功能

分析电路图的逻辑功能。
由逻辑门构成的组合逻辑电路,其分析过程通常分为以下三个步骤:①根据给定的逻辑电路,写出输出函数的逻辑表达式;②根据已写出的输出函数的逻辑表达式,列出真值表;③根据逻辑表达式或真值表,判断电路的逻辑功能。
【例1】【例2】【例3】【例4】组合逻辑电路的设计设计步骤: 1.逻辑问题描述将设计问题转换为逻辑问题,即用真值表或表达式的形式来描述设计问题; 2.逻辑函数化简用代数法或卡诺图法将逻辑问题化为最简与或式;3.逻辑函数变换根据给定逻辑门的类型、数量等因素,将表达式转换为所需形式; 4.画逻辑电路图并考虑实际工程问题。
【例5】设计一个组合逻辑电路,其输入ABCD 为8421BCD 码。
当输入BCD 数能被4或5整除时,电路输出F=1,否则F=0。
试分别用或非门和与或非门实现。
【例6】某厂有A 、B 、C 三个车间和Y 、 Z 两台发电机。
如果一个车间开工,启动Z 发电机即可满足使用要求; 如果两个车间同时开工,启动Y 发电机即可满足使用要求;如果三个车间同时开工,则需要同时启动Y 、 Z 两台发电机才能满足使用要求。
试仅用与非门和异或门两种逻辑门设计一个供电控制电路, 使电力负荷达到最佳匹配 【例7】.用与非门设计三变量多数表决器。
【例8】设计一个一位二进制半加器。
【例9】 用卡诺图法判断函数 是否存在险象。
触发器级电路分析D C A BD AD F ++=要确定一个用触发器构成的同步时序电路的功能,通常需要经过以下几个分析步骤:①根据给定电路写出输出方程组、激励方程组和次态方程组;②根据上述三个方程组列出电路的状态表;③根据状态表画出电路的状态图,必要时还可画出电路的工作波形;④根据状态图(或状态表、工作波形)确定电路的逻辑功能【例10】分析图5所示同步时序电路的功能,并画出电路的工作波形。
触发器级电路设计步骤(1) 导出原始状态图或状态表。
(2) 状态化简。
(3)状态分配。
数字实验2---可控加减法器

实验二 可控加减法器设计
实验目的:
熟悉全加器的逻辑功能和应用方法; 掌握利用集成全加器设计运算电路的方法。
实验仪器及器件:
(1)数字电路实验系统; (2)示波器; (3)与非门74LS00、74LS10,各1片; (4)四位全加器74LS283,2片。
实验二 可控加减法器设计
实验内容:
1、 利用4位集成全加器74LS283实现4位减法。 2、利用4位集成全加器74LS283设计一个BCD码加法器。 要求:改变加数与被加数数值,记录运算结果,验证设计是否正确,并作 表说明。
数字电子技术实验
实验室: 电气楼310
电 话: 51688346
数字电子技术实验
课程性质及目的: 将理论知识付诸实践,掌握集成器件的性能、应用和 数字电路的设计方法,在实践中深化理论,发现问题,总 结规律,培养独立思考,独立解决问题的能力。 课程主要内容: 基础实验(逻辑门参数测试,触发器等);设计实验 (可控加减法器,计数器,A/D与D/A转换电路应用,555 定时电路);综合性实验(数字函数发生器,简易交通灯 电路设计,多功能流水灯);总计24学时 基本要求:
(1)根据实验内容的要求,设计合理的电路,画出逻辑电路图; (2)借助EWB仿真软件检验设计结果,并做出分析;
(3)完成实验报告。
注意事项:
(1)在设计二—十进制加法器时,两片全加器的CI均应接地。 (2)注意十进制加法器的进位信号,写出逻辑表达式。
(3)本实验电路比较复杂,可先检查修正信号,正确后在做加六电 路。
预习报告;按时参加;大胆实践;认真总结,完成报告。 成绩评定:
预习30%;过程40%;报告20%;综合10%。
数字电子技术实验
数字电路实验项目及教学计划 1、TTL与CMOS集成逻辑门的参数测试 [7周(2) ] 2、可控加减法设计 [8周 (2)] 3、数字函数发生器 [9-10周(4) ] 4、触发器及其应用 [11周(2)] 5、计数器的设计与应用 [12周 (2) ] 6、简易交通灯控制电路 [13、14周 (4)] 7、 A/D、D/A转换电路应用设计 [15周(2) ] 8、 555定时电路 [16周(2)] 9、多功能流水灯 [17、18周(4)]
4位二进制加法器实验报告

4 位二进制加法器实验报告一、实验名称:4 位二进制加法器设计实验二、实验目的:1.进一步熟悉QuartusII 软件使用方法。
2.进一步掌握的VerilogHDL 语言描述和原理图描述的方法。
3.进一步掌握4 位二进制加法器的设计方法。
三、设计思想:用串行进位方式构成的 4 位二进制加法器如图:4 位串行进位二进制加法器是以一位二进制全加器为基础,如图,将四个一位二进制全加器串接构成一个4 位二进制加法器。
4 位二进制加法器可对两个4 位二进制数进行加法运算,同时产生进位。
当两个二进制数相加时,较高高位相加时必须加入较低位的进位项(Ci),以得到输出为和(S)和进位(C0)。
可以采用原理图的描述方法和VerilogHDL 语言描述方法。
四、实验内容:1.通过VerilogHDL 语言描述4 位二进制加法器的功能。
2.通过原理图方式描述4 位二进制加法器的功能。
3.通过波形仿真验证描述4 位二进制加法器的功能。
五、实验流程:1.采用VerilogHDL 语言描述实现4 位二进制加法器:(1).首先用VerilogHDL 语言编写二进制半加器:module halfadd(s,c,a,b);input a,b;output s,c;xor(s,a,b);and(c,a,b);endmodule按周期输入波形(2).再编写一位二进制全加器:module fulladd (s,co,a,b,cl); inputa,b,cl;output s,co;wire s1,d1,d2;halfadd ha1 (s1,d1,a,b); halfadd ha2 (s,d2,s1,cl);or g1(co,d2,d1);Endmodule按周期输入波形(2).之后编写4 位二进制加法器:module bitadd (s,c3,a,b,t1);input [3:0]a,b;input t1;output [3:0]s;output c3;wire c0,c1,c2;fulladd fa0(s[0],c0,a[0],b[0],t1);fulladd fa1(s[1],c1,a[1],b[1],c0);fulladd fa2(s[2],c2,a[2],b[2],c1);fulladd fa3(s[3],c3,a[3],b[3],c2);endmodule2.按照4 位二进制加法器的工作原理可以绘制成如下原理图:3.功能仿真波形及说明:(1).按周期输入波形:由此波形图可以分析:例如0001+0001=0010、0100+0100=1000、0110+0110=1100…对于所有的两个四位二进制相加,结果正确。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Σ
0
S'0 S'1 S'2
=A补+(-B)反+1 ( )
按位取反
B0 B1 B2 B3
1 1 1 1
Σ 进位
3
和S'
S'3
CO
1
C 为进位取反
分析: 分析: A与B相减的结果 与采用补码相加的比较 与 相减的结果 1. A-B≥0时 时 求A-B A补 A=0101 补码相加 0101 B=0001 直接相减 A 0101 - B 0001 0100
习题课
构成可控的加法、 例:试用四位二进制加法器74283构成可控的加法、减法器( 试用四位二进制加法器 构成可控的加法 减法器( 允许附加少量门)。 允许附加少量门)。 分析: 分析:A-B=A+(-B)
(A+(-B))补=A补+(-B)补 ( )
各位不变
A0 A1 A2 A3
0 A 3 0 B 3
S'0 S'1 S'2
0
Σ
A 0
S0 S1 S2
Σ 进位
B 3
S'2 S'3
S' =1 3 3
Σ 进位
3 B
3
0
1 0
CO CI
C' =1 C= C'
S3
S' 和 为 取 S’ 反 不 加 1 变
&
0 C'
3
CO CI
X 控制端X: 控制端 控制端X: 控制端
X=0: 实现加法运算 实现加法 加法运算 实现减法 减法运算 X=1: 实现减法运算
加异或门求反
C'
CI
S' =(A+(-B))补 =(A+(-B))原 =A-B
C' =1, 实现加1 C' =0, 不实现加1
A0 A1 A2 A3 B0 B1 B2 B3 =1 =1 =1 =1 B0
0 A 3 0
B1 B2 B3
Σ
0
S'0 =1 S'1 =1 =1
取反; 若C' 为1,则S' 取反; , 否则S' 不变。 否则 不变。
实现加法 加法运算 X=0: 实现加法运算 实现减法 减法运算 X=1: 实现减法运算
+ (-B) 1111 补 1 0100
进位反相) 借位 0 0100 (进位反相) B =0101 1. A-B<0时 A =0001 时 直接相减 补码相加 A 0001 A补 0001 - B 0101 + (-B)补 1011 1100 0 1100 借位 1 1100
当C' =1,有借位 ,
A-B < 0 S' =(A+(-B))补 (A+(-B))原 补码再求补 =((A+(-B))补 )补
得原码
S'0 S'1 S'2 S'3
=1 =1 =1 =1
0 A 3 0 B 3
Σ
0
S0 S1 S2
Σ 进位
3
和S
S3
加异或门求反 加异或门不反相 = (S')反+1=S
CO
当C'=0,无借位 , A 1=A