当前位置:网站首页>Design and implementation of an eight bit compensator based on logisim
Design and implementation of an eight bit compensator based on logisim
2022-07-16 05:13:00 【Drill up and strengthen】
One 、 Experimental principle
The original code of a positive number has the same form as the complement , The input signal is directly sent to the output through the input end of the compensation circuit out; The complement of a negative number is the inverse addition of the absolute value of the original code with the sign bit unchanged 1 after , Output out.
The complementary circuit is as follows :

Initial circuit diagram :

Two 、 Experimental content :
1、 be familiar with LogiSim Environmental Science
2、 Design a compensator
3、 ... and 、 Eight digit complementer ( The first 8 Bits are sign bits ) Circuit test
Example 1 : Positive numbers
Input :0000 0001 result :0000 0001

The complement of a positive number is the same as the original code .
Example 2 : negative
Input :1000 1001 result :1111 0110

The complement of negative numbers is obtained by adding one to the inverse of the original code .
Source code :
<?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=" Input "/>
</comp>
<comp lib="6" loc="(794,867)" name="Text">
<a name="text" val=" Output "/>
</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>
边栏推荐
- 自定义类型详解(结构体、枚举,联合)
- [interview: concurrent Article 12: multithreading: thread eight locks]
- 软件测试人员如何编写测试报告
- OpenText 企业内容管理和电子商务套件集成,整合和管理内容以实现最佳流程效率和合规性
- 一文理解分布式开发中的服务治理
- IE浏览器怎么查看cookie
- 1252. 奇数值单元格的数目 : 简单计数模拟题
- 微服务模式:Sidecar
- How can testing bring more value? Talk about test shift left and test shift right
- How to deal with the five obstacles of teamwork
猜你喜欢
随机推荐
基于SWMM及自主开发城市内涝一维二维耦合软件的复杂城市排水系统建模技术及在城市排涝、海绵城市等领域实践
软件测试人员如何编写测试报告
P1664 每日打卡心情好【入门】
Introduction to robot crawler
架构师进阶,微服务设计与治理的16条常用原则
Continous Gesture Recognition with hand-orented spatiotemporal feature
动态规划-LeetCode509.斐波那契数
Niobe 407 of kaihong Zhigu was officially incorporated into the code trunk of openharmony
一个描述机器学习对温室气体排放影响的系统框架
ABAP Bapi copy the standard project template to achieve project initiation
QT project summary record
C language foundation: n chess
[underlying principle] what is a socket? Why is the network inseparable from socket?
735. Planetary collision: simple stack simulation application problem
Explain the exercises in Chapter 3 of C language
Common tools and test methods for interface testing
Six diseases of distributed monomers
Mindjet MindManager adding image labels
【面试:并发篇12:多线程:线程八锁】
Lombok @Data导致的hashCode的问题








