当前位置:网站首页>基于logisim的八位求补器的设计与实现
基于logisim的八位求补器的设计与实现
2022-07-13 17:26:00 【钻仰弥坚】
一、实验原理
正数的原码与补码形式相同,直接由输入信号通过求补电路的输入端送至输出out;负数的补码是符号位不变原码的绝对值部分求反加1之后,输出out。
求补电路如下:

电路初始图:

二、实验内容:
1、熟悉LogiSim环境
2、设计一个求补器
三、八位求补器(第8位是符号位)电路测试
示例一:正数
输入:0000 0001 结果:0000 0001

正数的补码与原码相同。
示例二:负数
输入:1000 1001结果:1111 0110

负数的补码由原码各位取反加一得到。
源代码:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="2.7.1" version="1.0">
This file is intended to be loaded by Logisim (http://www.cburch.com/logisim/).
<lib desc="#Wiring" name="0"/>
<lib desc="#Gates" name="1"/>
<lib desc="#Plexers" name="2"/>
<lib desc="#Arithmetic" name="3"/>
<lib desc="#Memory" name="4"/>
<lib desc="#I/O" name="5"/>
<lib desc="#Base" name="6">
<tool name="Text Tool">
<a name="text" val=""/>
<a name="font" val="SansSerif plain 12"/>
<a name="halign" val="center"/>
<a name="valign" val="base"/>
</tool>
</lib>
<main name="main"/>
<options>
<a name="gateUndefined" val="ignore"/>
<a name="simlimit" val="1000"/>
<a name="simrand" val="0"/>
</options>
<mappings>
<tool lib="6" map="Button2" name="Menu Tool"/>
<tool lib="6" map="Button3" name="Menu Tool"/>
<tool lib="6" map="Ctrl Button1" name="Menu Tool"/>
</mappings>
<toolbar>
<tool lib="6" name="Poke Tool"/>
<tool lib="6" name="Edit Tool"/>
<tool lib="6" name="Text Tool">
<a name="text" val=""/>
<a name="font" val="SansSerif plain 12"/>
<a name="halign" val="center"/>
<a name="valign" val="base"/>
</tool>
<sep/>
<tool lib="0" name="Pin">
<a name="tristate" val="false"/>
</tool>
<tool lib="0" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="labelloc" val="east"/>
</tool>
<tool lib="1" name="NOT Gate"/>
<tool lib="1" name="AND Gate"/>
<tool lib="1" name="OR Gate"/>
</toolbar>
<circuit name="main">
<a name="circuit" val="main"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="SansSerif plain 12"/>
<wire from="(680,600)" to="(680,610)"/>
<wire from="(930,370)" to="(980,370)"/>
<wire from="(970,590)" to="(970,730)"/>
<wire from="(810,340)" to="(810,540)"/>
<wire from="(810,810)" to="(810,820)"/>
<wire from="(880,840)" to="(880,850)"/>
<wire from="(440,160)" to="(440,430)"/>
<wire from="(980,370)" to="(980,440)"/>
<wire from="(520,130)" to="(520,330)"/>
<wire from="(830,790)" to="(830,820)"/>
<wire from="(860,730)" to="(860,820)"/>
<wire from="(1000,160)" to="(1000,440)"/>
<wire from="(520,330)" to="(520,540)"/>
<wire from="(280,160)" to="(280,440)"/>
<wire from="(860,730)" to="(970,730)"/>
<wire from="(830,740)" to="(850,740)"/>
<wire from="(1000,160)" to="(1150,160)"/>
<wire from="(500,330)" to="(520,330)"/>
<wire from="(610,790)" to="(830,790)"/>
<wire from="(540,610)" to="(610,610)"/>
<wire from="(90,820)" to="(800,820)"/>
<wire from="(1100,360)" to="(1100,530)"/>
<wire from="(850,490)" to="(850,540)"/>
<wire from="(350,350)" to="(410,350)"/>
<wire from="(230,150)" to="(1190,150)"/>
<wire from="(680,610)" to="(730,610)"/>
<wire from="(1150,160)" to="(1150,440)"/>
<wire from="(500,350)" to="(550,350)"/>
<wire from="(1180,160)" to="(1180,380)"/>
<wire from="(390,330)" to="(390,530)"/>
<wire from="(690,350)" to="(730,350)"/>
<wire from="(710,160)" to="(710,440)"/>
<wire from="(550,350)" to="(550,440)"/>
<wire from="(410,590)" to="(410,800)"/>
<wire from="(90,160)" to="(90,820)"/>
<wire from="(660,120)" to="(660,340)"/>
<wire from="(250,590)" to="(250,810)"/>
<wire from="(730,770)" to="(840,770)"/>
<wire from="(840,360)" to="(840,440)"/>
<wire from="(350,330)" to="(390,330)"/>
<wire from="(410,350)" to="(450,350)"/>
<wire from="(1130,380)" to="(1180,380)"/>
<wire from="(410,800)" to="(820,800)"/>
<wire from="(710,160)" to="(860,160)"/>
<wire from="(280,160)" to="(440,160)"/>
<wire from="(520,130)" to="(1190,130)"/>
<wire from="(810,110)" to="(810,340)"/>
<wire from="(1130,380)" to="(1130,440)"/>
<wire from="(870,760)" to="(870,820)"/>
<wire from="(430,480)" to="(430,530)"/>
<wire from="(860,160)" to="(1000,160)"/>
<wire from="(560,490)" to="(560,540)"/>
<wire from="(1120,590)" to="(1120,760)"/>
<wire from="(390,140)" to="(390,330)"/>
<wire from="(1080,360)" to="(1100,360)"/>
<wire from="(840,770)" to="(840,820)"/>
<wire from="(230,150)" to="(230,530)"/>
<wire from="(540,600)" to="(540,610)"/>
<wire from="(810,110)" to="(1190,110)"/>
<wire from="(870,760)" to="(1120,760)"/>
<wire from="(250,350)" to="(300,350)"/>
<wire from="(860,160)" to="(860,440)"/>
<wire from="(820,800)" to="(820,820)"/>
<wire from="(850,740)" to="(850,820)"/>
<wire from="(1080,380)" to="(1130,380)"/>
<wire from="(660,120)" to="(1190,120)"/>
<wire from="(390,140)" to="(1190,140)"/>
<wire from="(990,490)" to="(990,530)"/>
<wire from="(1180,160)" to="(1190,160)"/>
<wire from="(780,340)" to="(810,340)"/>
<wire from="(730,610)" to="(730,770)"/>
<wire from="(270,490)" to="(270,530)"/>
<wire from="(950,100)" to="(950,350)"/>
<wire from="(1100,90)" to="(1190,90)"/>
<wire from="(440,160)" to="(570,160)"/>
<wire from="(950,350)" to="(950,530)"/>
<wire from="(570,160)" to="(710,160)"/>
<wire from="(610,610)" to="(610,790)"/>
<wire from="(830,600)" to="(830,740)"/>
<wire from="(980,370)" to="(1030,370)"/>
<wire from="(660,340)" to="(660,540)"/>
<wire from="(90,160)" to="(280,160)"/>
<wire from="(640,350)" to="(690,350)"/>
<wire from="(780,360)" to="(840,360)"/>
<wire from="(570,160)" to="(570,440)"/>
<wire from="(690,350)" to="(690,440)"/>
<wire from="(550,350)" to="(590,350)"/>
<wire from="(250,810)" to="(810,810)"/>
<wire from="(840,360)" to="(880,360)"/>
<wire from="(410,350)" to="(410,430)"/>
<wire from="(250,350)" to="(250,440)"/>
<wire from="(950,100)" to="(1190,100)"/>
<wire from="(1100,90)" to="(1100,360)"/>
<wire from="(930,350)" to="(950,350)"/>
<wire from="(640,340)" to="(660,340)"/>
<wire from="(1150,160)" to="(1180,160)"/>
<wire from="(700,490)" to="(700,540)"/>
<wire from="(1140,490)" to="(1140,530)"/>
<comp lib="1" loc="(250,590)" name="XOR Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="0" loc="(880,840)" name="Splitter">
<a name="facing" val="north"/>
<a name="fanout" val="8"/>
<a name="incoming" val="8"/>
</comp>
<comp lib="1" loc="(990,490)" name="AND Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(1030,370)" name="OR Gate">
<a name="facing" val="west"/>
<a name="label" val="c0"/>
</comp>
<comp lib="1" loc="(700,490)" name="AND Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(430,480)" name="AND Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(730,350)" name="OR Gate">
<a name="facing" val="west"/>
<a name="label" val="c2"/>
</comp>
<comp lib="1" loc="(970,590)" name="XOR Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(880,360)" name="OR Gate">
<a name="facing" val="west"/>
<a name="label" val="c1"/>
</comp>
<comp lib="1" loc="(270,490)" name="AND Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(850,490)" name="AND Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="0" loc="(1210,80)" name="Splitter">
<a name="facing" val="west"/>
<a name="fanout" val="8"/>
<a name="incoming" val="8"/>
</comp>
<comp lib="0" loc="(880,850)" name="Pin">
<a name="facing" val="north"/>
<a name="output" val="true"/>
<a name="width" val="8"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="1" loc="(410,590)" name="XOR Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(300,350)" name="OR Gate">
<a name="facing" val="west"/>
<a name="label" val="c5"/>
</comp>
<comp lib="1" loc="(560,490)" name="AND Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(1120,590)" name="XOR Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(830,600)" name="XOR Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(450,350)" name="OR Gate">
<a name="facing" val="west"/>
<a name="label" val="c4"/>
</comp>
<comp lib="1" loc="(680,600)" name="XOR Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="1" loc="(1140,490)" name="AND Gate">
<a name="facing" val="south"/>
</comp>
<comp lib="6" loc="(1271,52)" name="Text">
<a name="text" val="输入"/>
</comp>
<comp lib="6" loc="(794,867)" name="Text">
<a name="text" val="输出"/>
</comp>
<comp lib="0" loc="(1210,80)" name="Pin">
<a name="facing" val="west"/>
<a name="width" val="8"/>
<a name="tristate" val="false"/>
</comp>
<comp lib="1" loc="(590,350)" name="OR Gate">
<a name="facing" val="west"/>
<a name="label" val="c3"/>
</comp>
<comp lib="1" loc="(540,600)" name="XOR Gate">
<a name="facing" val="south"/>
</comp>
</circuit>
</project>
边栏推荐
猜你喜欢

fiddler和charles拦截并修改请求和返回值

2018-cvpr-Gesture Recognition: Focus on the Hands

Tensor是如何让你的内存/显存泄漏的

ABAP BAPI 复制标准项目模板实现项目立项

边缘计算 KubeEdge+EdgeMash

开鸿智谷 Niobe 407 正式并入OpenHarmony代码主干

See you in Chengdu, starrocks! How can enterprises create a new paradigm of rapid and unified data analysis to help businesses upgrade in an all-round way

一种可灰度的接口迁移方案

Common tools and test methods for interface testing

A systematic framework for describing the impact of machine learning on greenhouse gas emissions
随机推荐
Qucs初步使用指南(不是multism)
开鸿智谷 Niobe 407 正式并入OpenHarmony代码主干
Lu te software Qi Jun: cloud native helps SaaS business tenants to isolate efficiently
PHP basics explain PHP Basics
How to deal with the five obstacles of teamwork
Oracle本地网络服务
The parameters trained by tensorflow are transformed into those under Caffe framework Caffemodel model
735. Planetary collision: simple stack simulation application problem
提示您与该网站的连接不是私密连接怎么办?
安装pycharm
Mysql-MVCC
c语言编译器介绍
被final修饰的变量到底能不能被修改
flow_x+flow_y---RGB
Quickly teach you how to build a data-driven automated testing framework?
目标检测
How to realize digital transformation? McKinsey: four steps of digital transformation
User defined type explanation (structure, enumeration, Union)
(转载)PlantUML快速指南
QT project summary record