Ask a question from expert

Ask now

Computer Processor - Type of Logic Gates

29 Pages2518 Words26 Views
   

Added on  2022-08-12

About This Document

Computer Processors module Implementing .hdl files

Computer Processor - Type of Logic Gates

   Added on 2022-08-12

BookmarkShareRelated Documents
Introduction
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 .
Purpose:
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;
Computer Processor - Type of Logic Gates_1
OUT out;
PARTS:
Nand(a=x,b=x,out=out);
}
Screenshot :
This contains the script part after loading script then we compare the
output with .cmp file :
Output :
Computer Processor - Type of Logic Gates_2
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;
PARTS:
// Put your code here:
Computer Processor - Type of Logic Gates_3
Nand(a=x,b=y,out=nandxy);
Not(x = nandxy , out=out);
}
Screenshot:
Script :
Compare :
Output :
Computer Processor - Type of Logic Gates_4
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 :
Computer Processor - Type of Logic Gates_5
Compare :
Output:
Computer Processor - Type of Logic Gates_6

End of preview

Want to access all the pages? Upload your documents or become a member.