Computer Processor - Type of Logic Gates

Added on - Aug 2022

Computer Processors module Implementing .hdl files

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 6 of 29 pages
This is a computer processor topic in which we test different type of logic gates.
It uses Hardware simulator to run the chips. Here we will be discussing about the
universal gates and using them we having created multiplexor, demultiplexer.
It consists of the 3 files - .hdl,.tst,.cmp
Designing of chips are not sufficient we need to write the chips in a way that
computer can understand. So we write the parts in .hdl(Hardware Description
Language) then we load the script which is present in .tst file then we compare
the output to the .cmp file where already the truth table are present and it
matches the output file to .cmp file to check whether the parts written in .hdl file
is correct or not .
The purpose here is to convert the logic gates in the computer readable
language using the hardware stimulator which uses JVM as a complier. If it
doesn’t found any type of file then it searches it in its own directory.
Function :
1.Not gate :
The not gate take input x as 1 bit . if x = 0 then out is 1 , if x = 1 then out
is 0 .
It inverts the value of the input .
Diagram :
Truth table:
We will implement the following Not gate in Hdl file and will compare the
output :
Hdl file code :
CHIP Not {
IN x;
OUT out;
Screenshot :
This contains the script part after loading script then we compare the
output with .cmp file :
Output :
2.And gate :
The and gate takes input as 2 bit . If input are x=1,y=1 then out is 1
otherwise 0.
Here we are using one nand and one or gate .
Diagram :
Truth table :
Hdl code :
CHIP And {
IN x, y;
OUT out;
// Put your code here:
Not(x = nandxy , out=out);
Script :
Compare :
Output :
3.Or gate :
The or gate take input as 2 bit , if x=0 , y =0 then out is 0 otherwise 1.
Here we are using 3 nand gates .
Diagram :
Truth table :
Screenshot :
Compare :
Desklib Logo
You are reading a preview
Upload your documents to download or

Become a Desklib member to get access