Building a Virtual Computer

Size: px
Start display at page:

Download "Building a Virtual Computer"

Transcription

1 uilding a Virtual Computer From Gates to Operating System Student Researcher: Elisa Elshamy Faculty Mentor: Dr. Victoria Gitman

2 bstract modern computer can carry a plethora of multifaceted computations. Realizing this, one would be led to believe that computer hardware is built to be as complicated as machinery can get. Instead, it turns that the structure of computer hardware is really a sophisticated concatenation of elementary oolean gates. In this project, we used the Hardware Description Language (HDL) together with hardware simulator software to virtually build the components of a simple computer s hardware platform. Using the single fundamental building block NND gate, we started by building chips (concatenations of oolean gates) to carry the most basic logic functions such as ND, OR and NOT. From these chips, we in turn built the LU, RM, CPU and put it all together into a functioning hardware platform. Since the bare bones of computing come down to functions of binary patterns, we implemented the fundamental set of such functions in the LU. The first advanced function we built was multi-bit binary addition. Next, the rithmetic Logic Unit (LU) brought together the elementary oolean logic gates along with the addition function to become the chip that performs all basic binary functions required for program execution. To implement the storage and processing of data, the computer hardware requires an inbuilt clock. It is realized by an oscillator that alternates between two puts, and to signal tick and tock. The synchronization and time delay provided by the clock is exploited for data storage and manipulation by the fundamental Data-Flip-Flop (DFF) gate that implements the time-based behavior (t) = in(t-), where put is the input from the previous time unit. We used the DFF gate to build a basic unit of data storage that remembers a bit of information by constantly cycling its value between input and put until instructed to modify what it stores. These basic chips were glued together to form registers of which the Random ccess Memory (RM) is composed. The master behind computer operation is the Central Processing Unit (CPU). The CPU, which is composed of the LU, several registers and a program counter chip designed to keep track of program execution, synchronizes computer functionality by decoding, executing, and fetching program instructions. The instructions the CPU receives from the instruction memory or ROM (which is identical to the RM memory except it is used to store instructions and not data) are decoded to determine what actions the LU will take to execute each instruction, and where in the RM memory the LU s put will be stored. Upon completion of the CPU, we now have a fully functional computer hardware. We are continuing the project to implement the software end of the computer by writing the assembler, virtual machine, compiler, and operating system programs.

3 von Neumann rchitecture The stored program concept Memory (data + instructions) CPU rithmetic Logic Unit (LU) Registers Control Input Output Memory continuous array of registers where each cell has a unique address Data Memory Read and written to by programs, assist with program execution Instruction Memory Where high-level and machine language programs that decode high-level instructions are stored CPU Central Processing Unit, executes instructions of current program rithmetic Logic Unit (LU) Performs low-level arithmetic and logic operations Registers Small amount of local memory for quick calculating Control Unit Decodes, executes and fetches instructions Input/Output Screens, keyboards, mice, printers, scanners, network interface cards, and other peripheral Depicted left is the von Neumann architecture. The von Neumann machine is a conceptual blueprint for building many computers today and is best known for using the stored program concept. John von Neumann The stored program 2/28/93 2/8/957 concept is a key element to many computer models, abstract and practical alike. Instead of embedding programs into hardware, programs are stored in the computers memory much like software. This allows for reusability with the hardware and the versatility of loading different programs to instruct the computer to perform different tasks. The von Neumann architecture associated with our platform separates instruction from data memory. Instruction memory holds the program s code and data memory is manipulated as needed to assist with program execution.

4 uilding locks Logic diagram for NND gate oolean logic for NND gate Hardware Simulator We used the NND gate as a building block to build all the other gates (ND, OR, NOT, XOR, etc) Every gate, can be built from a simple NND gate Gates were built virtually, no usage of soldering irons or wires, but a hardware simulator. The hardware simulator is a software tool that can make a model of any chip as specified by an HDL (Hardware Description Language) program. In the real world, hardware designers use simulators much like this one to completely plan chip architecture and perform a series of rigorous testing before any production takes place.

5 Elementary Logic Gates in NOT ND Logic diagram for NOT gate Logic diagram for ND gate OR Logic diagram for OR gate in oolean logic for NOT gate oolean logic for ND gate oolean logic for OR gate CHIP Not { IN in; OUT ; PRTS: Nand(a=in, b=in, =); } NOT gate HDL program CHIP nd { IN a, b; OUT ; PRTS: Nand(a=a, b=b, =nandout); Not(in=nandOut, =); } ND gate HDL program CHIP Or { IN a, b; OUT ; PRTS: Not(in=a, =aout); Not(in=b, =bout); Nand(a=aOut, b=bout, =); } OR gate HDL program

6 Multiplexor Gate The root of conditional logic MUX sel Logic diagram for MUX gate C D 4-way MUX sel[] sel[] Logic diagram for 4-way MUX gate sel sel[] Conditional logic for MUX gate If sel == = ; else = ; sel[] C D Conditional logic for 4-way MUX gate CHIP Mux { IN a, b, sel; OUT ; PRTS: Or(a=a, b=sel, =); Not(in=b, =not); Nand(a=not, b=sel, =2); nd(a=, b=2, =); } MUX gate HDL program The multiplexor gate uses the selector bit to decide which pin to put. We can think of the logic of the multiplexor gate as an conditional if statement. We later built more complicated models such as the 4-way multiplexor shown left. The inputs,, C, and D as well as the put are each 6-bit wide.

7 inary ddition 2 s complement numbers and adder chips inary ddition We add a pair of binary numbers the same way we would its decimal representation. Starting from the right column (Least Significant its) and bringing the carry bit ( or ) to the next column until we reach the leftmost column (Most Significant its). The binary system is founded on base 2. If we are presented a binary string such as, we can convert it to its decimal equivalent as follows: = *2 + *2 + *2 + *2 + *2 = 9 2 s Complement for signed binary numbers To represent signed Positive numbers, we split the bit Numbers (carry) space into two equal 3 subsets. ddition of signed + -4 binary numbers is (-4) = - equivalent to its decimal representation. Half dder sum carry (MS) Half dder Half-dder (left) & Full-dder implementation (right) C (LS) Half dder OR sum carry Negative Numbers s complement for a 3-bit binary system 2 x = n 2 = 2 x 3 if x otherwise 2 = 6 =

8 x y 6 bits rithmetic Logic Unit (LU) zx nx zy ny f no LU zr ng LU Logic Diagram f(x.y) 6 bits zr //True iff = ng //True iff < These bits preset the x input zx if zx then x= nx if nx then x=!x These bits preset the y input zy if zy then y= ny if ny then y=!y f if f then =x+ y else = x&y no if no then =! Resulting LU function = f(x,y)=!x!y x + y y - x x & y LU truth table showing some of the possible logic functions that can be computed based on the first six bits. The complete 6-bit LU table would show sixty-four functions Using careful design, a 6-bit LU can compute 2 6 =64 functions. Which function the LU decides to put is based on a combination of six bits called control bits. The LU is the chip that is constructed to carry all the primitive operations desired in the computer architecture and at the heart of its logic. x y

9 Clocks and Flip-Flops computer clock is much like a see-saw, alternating back and forth between signals ( and ) in DFF (t) = in(t-) Logic diagram of data flip-flop. t the end of each clock cycle, the DFF puts the input value from the previous cycle. Clock Cycles Computers use a master clock to represent the passage of time. This clock is usually implemented from an oscillating device that delivers an infinite alternating train of signals ( and, low and high, tick and tock). computer clock cycle is defined to start at the beginning of a tick and conclude at the end of the subsequent tock. Flip-Flops Flops To build chips which could maintain state, it was essential to have a building block with sequential properties. The data flipflop, or DFF, takes the current clock s signal as input to implement time-based behavior. In other words, the DFF takes advantage the clock and uses it to control the put of data. Memory chips built on top of DFFs remember values by sending put back to the input pin and putting it again until told by a control bit to accept a new value.

10 in load MUX From Registers to RM maintaining state with feedback loops DFF if load(t-) then (t) = in(t-) else (t) = (t-) Logic diagram of -bit data register in IT Registers and Feedback Loops DFF can only put its previous input, (t) = in(t-). register on the other hand, can also put a previous put, (t) = (t-) and thus maintain state. This is accomplished in sequential chips through the formation of feedback loops. feedback loop occurs when the put can be fed back to the input pin of the chip. Sequential chips, such as DFFs have an inherent time delay due to the clock input and allow for the construction of memory devices, such as registers. register stores values according to the control bit (load). If load is, the register reads the value from in and stores it. If load is, it keeps the current value. in load... IT load IT From single to multi-bit registers to Random ccess Memory (RM). in (word) address ( to n-) load Register Register Register n- n RMn direct access logic (word)

11 Random ccess Memory (RM) RM is an array of n w-bit registers. We describe the RM s specs in accordance to the number of registers n and the width of each register w. These components are referred to as the memory s size and width respectively. RM storage and Retrieval of data load RM 64 Read: To read a value from a given register m within the RM, we must put m in the Register RM8 address input. The value in register m will Register be putted to the RM s put pin. in (word) address ( to n-) Register 8 RM8 direct access logic (word).. RM8 Depicted above is the gradual construction of RM. The underlying architecture of RM is nothing more than an array of registers. Write: To write a value d to a given register m within the RM, we must put m in the address input, d in the in input, and signal the load input. The RM s direct access logic will select the register m and use the load bit to enable it for data storage. In the next clock cycle, the value d will be committed to register m and the RM s put pin.

12 Designated Registers for machine language instructions Other than the instruction memory (ROM) and data memory (RM), there is a set of registers in the processor s region. This set of registers is handy when the processor is carrying a list of instructions and must maneuver data and instructions at high speed. M Register Register Local to the processor Value is the address of a register in RM Value may also represent the location of the next instruction that should be executed Can also store data values and constants on the fly For example if we want = //= The proceeding instruction decides how to use the value D Register Local to the processor Stores data values only for quick calculations and comparison testing of conditionals For example if we want //=5 D = //D==5 Not local to the processor n actual memory location in RM ccessed by the value in the register, in other words the value of the register is the address of the M register s location. For example if we want M[56] = //=56 M = 4 //M[56] = 4

13 /C-Instructions machine language specification machine language program is a series of coded instructions written for the computer to perform basic arithmetic and logic functions. The hardware specification and machine language syntax describe how these coded instructions are read. Since binary strings are cryptic to the human brain, assembly language was developed to make low-level programming feasible. ssembly language replaces codes such as to symbols like add which are easier to understand and much more readable. Since program instructions are 6-bits wide and addresses are specified by 5-bits, our computer platform separates operation code from address instructions. In order to distinguish between the two instructions, -Instructions (address code) always have a most significant bit of while C-Instructions (Computation Code) always have a most significant bit of. -Instructions Value (v = or ) v v v v v v v v v v v v v v v Sets the register to a 5-bit value Must be a non-negative decimal value Uses of -Instruction: Enter a constant on the fly Specifies the location of data memory that should be manipulated by the subsequent C-Instruction Specifies the location for the jump destination of the proceeding instruction C-Instructions a c c2 c3 c4 comp dest jump c5 c6 d d2 d3 j j2 j3 The C-Instruction is broken into three fields: Comp Tells the LU which function to compute as predefined by the language specification Dest States which register(s) (, D, or M) should store the computed value Jump Notifies the computer of which instruction to fetch next.

14 I/O Handling interacting with the screen and keyboard Input/Output Handling Our computer can interact with two peripheral devices: a screen and a keyboard. The computer platform and these devices talk to each other via memory maps. Drawing pixels on the screen and listening to the keyboard is accomplished by writing to and reading from designated memory segments associated with the peripherals. Screen Our computer uses a black-and-white screen with 256 rows of 52 pixels per row. The screen s memory map begins at RM address 6384 and every row is represented by a 32 6-bit word. To read or write to a pixel on the screen, the corresponding bit in the memory map must be read or written to (=white, =black). Keyboard The keyboard s single-word memory map begins at RM address nytime a key is pressed it s SCII code appears in RM[24576]. If no key is pressed, RM[24576] holds the value. Simulation of the screen and keyboard used with our computer.

15 Central Processing Unit (CPU) Central Processing Unit The CPU is designed to process instructions and is the core of computational logic. Underlying the CPU is the LU, a set of registers, and control logic (i.e. Mux gates) all of which are implemented for assisting with fetching and decoding instructions. CPU s Control Logic Instruction Decoding The 6-bit word in the CPU s input pin can either represent an address or a compute instruction. The CPU decodes the instruction by breaking it into smaller fields. Instruction Executing fter the instruction is broken into smaller fields, the CPU res each part to it s designated chip. For example, a part of the instruction gets sent to the LU where it will determine which function to compute. Next Instruction Fetching s the CPU executes the current instruction, it must also determine which instruction to process next. This is accomplished as a function of the current instruction, the LU put and the program counter. Logical diagram of the CPU. It should be noted that this diagram is intended to give a brief overview and is missing detail such as the CPU s control logic.

16 The Computer Platform Our computer platform as a logic diagram depicted above. Underlying the computer architecture are memory gates and the CPU chip. elow, a simple sketch of our computer interacting with peripheral devices. Using all the gates and chips mentioned, we built a complete computer platform. This computer platform is a general-purpose machine, meaning that it is versatile and can switch from running one program to another. The significance of hardware design lies in its performance. Issues circumventing performance usually regard memory hierarchies, better access to I/O devices, instruction prefetching, and anything that can allow for faster computation. Our next steps will be to implement the software end of the computer by writing the assembler, virtual machine, compiler, and operating system programs.

CS 31: Intro to Systems Digital Logic

CS 31: Intro to Systems Digital Logic CS 3: Intro to Systems Digital Logic Martin Gagné Swarthmore College January 3, 27 You re going to want scratch papr today borrow some if needed. Quick nnouncements Late Policy Reminder 3 late days total

More information

Topics of this Slideset. CS429: Computer Organization and Architecture. Digital Signals. Truth Tables. Logic Design

Topics of this Slideset. CS429: Computer Organization and Architecture. Digital Signals. Truth Tables. Logic Design Topics of this Slideset CS429: Computer Organization and rchitecture Dr. Bill Young Department of Computer Science University of Texas at ustin Last updated: July 5, 2018 at 11:55 To execute a program

More information

Boolean Arithmetic. From Nand to Tetris Building a Modern Computer from First Principles. Chapter 2

Boolean Arithmetic. From Nand to Tetris Building a Modern Computer from First Principles. Chapter 2 From Nand to Tetris Building a Modern Computer from First Principles Chapter 2 Boolean Arithmetic These slides support chapter 2 of the book The Elements of Computing Systems By Noam Nisan and Shimon Schocken

More information

Computer Organization and Levels of Abstraction

Computer Organization and Levels of Abstraction Computer Organization and Levels of Abstraction Announcements Today: PS 7 Lab 8: Sound Lab tonight bring machines and headphones! PA 7 Tomorrow: Lab 9 Friday: PS8 Today (Short) Floating point review Boolean

More information

Logic Design (Part 2) Combinational Logic Circuits (Chapter 3)

Logic Design (Part 2) Combinational Logic Circuits (Chapter 3) Digital Logic Circuits Logic Design (Part ) Combinational Logic Circuits (Chapter 3) ² We saw how we can build the simple logic gates using transistors ² Use these gates as building blocks to build more

More information

Computer Architecture

Computer Architecture ID Herzliya Shimon Schocken omputer rchitecture Shimon Schocken Spring 2005 Elements of omputing Systems 1 omputer rchitecture (h 5) Some early computers Multiplier Blaise Pascal, 23-62 Gottfried Leibniz,

More information

Computer Organization and Levels of Abstraction

Computer Organization and Levels of Abstraction Computer Organization and Levels of Abstraction Announcements PS8 Due today PS9 Due July 22 Sound Lab tonight bring machines and headphones! Binary Search Today Review of binary floating point notation

More information

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture Points ddressed in this Lecture Lecture 6: Signed Numbers rithmetic Circuits Professor Peter Cheung Department of EEE, Imperial College London (Floyd 2.5-2.7, 6.1-6.7) (Tocci 6.1-6.11, 9.1-9.2, 9.4) Representing

More information

Computer Architecture

Computer Architecture Computer Architecture Building a Modern Computer From First Principles www.nand2tetris.org Elements of Computing Systems, Nisan & Schocken, MIT Press, www.nand2tetris.org, Chapter 5: Computer Architecture

More information

Introduction to MiniSim A Simple von Neumann Machine

Introduction to MiniSim A Simple von Neumann Machine Math 121: Introduction to Computing Handout #19 Introduction to MiniSim A Simple von Neumann Machine Programming languages like C, C++, Java, or even Karel are called high-level languages because they

More information

Chapter 5 Registers & Counters

Chapter 5 Registers & Counters University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Kewal K. Saluja and Yu Hen Hu Spring 2002 Chapter 5 Registers & Counters Originals by: Charles R. Kime Modified for course

More information

Digital Logic Design Exercises. Assignment 1

Digital Logic Design Exercises. Assignment 1 Assignment 1 For Exercises 1-5, match the following numbers with their definition A Number Natural number C Integer number D Negative number E Rational number 1 A unit of an abstract mathematical system

More information

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0. Register Transfer Language Computers are the electronic devices which have several sets of digital hardware which are inter connected to exchange data. Digital hardware comprises of VLSI Chips which are

More information

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Dec Hex Bin ORG ; ZERO. Introduction To Computing Dec Hex Bin 0 0 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and

More information

CS101 Lecture 25: The Machinery of Computation: Computer Architecture. John Magee 29 July 2013 Some material copyright Jones and Bartlett

CS101 Lecture 25: The Machinery of Computation: Computer Architecture. John Magee 29 July 2013 Some material copyright Jones and Bartlett CS101 Lecture 25: The Machinery of Computation: Computer Architecture John Magee 29 July 2013 Some material copyright Jones and Bartlett 1 Overview/Questions What did we do last time? Can we relate this

More information

Parallel logic circuits

Parallel logic circuits Computer Mathematics Week 9 Parallel logic circuits College of Information cience and Engineering Ritsumeikan University last week the mathematics of logic circuits the foundation of all digital design

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

Von Neumann Architecture

Von Neumann Architecture Von Neumann Architecture Assist lecturer Donya A. Khalid Lecture 2 2/29/27 Computer Organization Introduction In 945, just after the World War, Jon Von Neumann proposed to build a more flexible computer.

More information

structure syntax different levels of abstraction

structure syntax different levels of abstraction This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital

More information

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital

More information

Software and Hardware

Software and Hardware Software and Hardware Numbers At the most fundamental level, a computer manipulates electricity according to specific rules To make those rules produce something useful, we need to associate the electrical

More information

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan COSC 122 Computer Fluency Computer Organization Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Key Points 1) The standard computer (von Neumann) architecture consists

More information

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to access them. Contents at a Glance About the Author...xi

More information

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS Name: Instructor: Engr. Date Performed: Marks Obtained: /10 Group Members (ID):. Checked By: Date: Experiment # 09 MULTIPLEXERS OBJECTIVES: To experimentally verify the proper operation of a multiplexer.

More information

Topic #6. Processor Design

Topic #6. Processor Design Topic #6 Processor Design Major Goals! To present the single-cycle implementation and to develop the student's understanding of combinational and clocked sequential circuits and the relationship between

More information

ENCM 369 Winter 2019 Lab 6 for the Week of February 25

ENCM 369 Winter 2019 Lab 6 for the Week of February 25 page of ENCM 369 Winter 29 Lab 6 for the Week of February 25 Steve Norman Department of Electrical & Computer Engineering University of Calgary February 29 Lab instructions and other documents for ENCM

More information

Boolean Logic CS.352.F12

Boolean Logic CS.352.F12 Boolean Logic CS.352.F12 Boolean Algebra Boolean Algebra Mathematical system used to manipulate logic equations. Boolean: deals with binary values (True/False, yes/no, on/off, 1/0) Algebra: set of operations

More information

Computer Organization

Computer Organization INF 101 Fundamental Information Technology Computer Organization Assistant Prof. Dr. Turgay ĐBRĐKÇĐ Course slides are adapted from slides provided by Addison-Wesley Computing Fundamentals of Information

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications EE 3170 Microcontroller Applications Lecture 4 : Processors, Computers, and Controllers - 1.2 (reading assignment), 1.3-1.5 Based on slides for ECE3170 by Profs. Kieckhafer, Davis, Tan, and Cischke Outline

More information

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra Binary Representation Computer Systems Information is represented as a sequence of binary digits: Bits What the actual bits represent depends on the context: Seminar 3 Numerical value (integer, floating

More information

Stack. Heap. Static. Code

Stack. Heap. Static. Code CS6C Virtual Wrap-Up Processor Datapath Lecture pril 9, 999 Dave Patterson (http.cs.berkeley.edu/~patterson) www-inst.eecs.berkeley.edu/~cs6c/schedule.html Outline Review Virtual Introduce Datapath Top-Down

More information

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 16, 2000

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 16, 2000 CMPUT 101 with Solutions Quiz 2 (50 minutes) November 16, 2000 Last Name: First Name: Section: Instructor: A6 Yngvi Bjornsson Instructions: Read carefully before proceeding. No calculators, books or other

More information

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment Assignment 1. What is multiplexer? With logic circuit and function table explain the working of 4 to 1 line multiplexer. 2. Implement following Boolean function using 8: 1 multiplexer. F(A,B,C,D) = (2,3,5,7,8,9,12,13,14,15)

More information

Register Transfer and Micro-operations

Register Transfer and Micro-operations Register Transfer Language Register Transfer Bus Memory Transfer Micro-operations Some Application of Logic Micro Operations Register Transfer and Micro-operations Learning Objectives After reading this

More information

CS 261 Fall Mike Lam, Professor. Combinational Circuits

CS 261 Fall Mike Lam, Professor. Combinational Circuits CS 261 Fall 2017 Mike Lam, Professor Combinational Circuits The final frontier Java programs running on Java VM C programs compiled on Linux Assembly / machine code on CPU + memory??? Switches and electric

More information

DC57 COMPUTER ORGANIZATION JUNE 2013

DC57 COMPUTER ORGANIZATION JUNE 2013 Q2 (a) How do various factors like Hardware design, Instruction set, Compiler related to the performance of a computer? The most important measure of a computer is how quickly it can execute programs.

More information

Levels in Processor Design

Levels in Processor Design Levels in Processor Design Circuit design Keywords: transistors, wires etc.results in gates, flip-flops etc. Logical design Putting gates (AND, NAND, ) and flip-flops together to build basic blocks such

More information

Appendix A: Hardware Description Language (HDL) 1

Appendix A: Hardware Description Language (HDL) 1 Appendix A: HDL 231 Appendix A: Hardware Description Language (HDL) 1 Intelligence is the faculty of making artificial objects, especially tools to make tools. Henry Bergson (1859-1941) A Hardware Description

More information

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital hardware modules that accomplish a specific information-processing task. Digital systems vary in

More information

CS61C : Machine Structures

CS61C : Machine Structures CS 61C L path (1) insteecsberkeleyedu/~cs61c/su6 CS61C : Machine Structures Lecture # path natomy: 5 components of any Computer Personal Computer -7-25 This week Computer Processor ( brain ) path ( brawn

More information

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1 COSC 243 Computer Architecture 1 COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1 Overview Last Lecture Flip flops This Lecture Computers Next Lecture Instruction sets and addressing

More information

EP1200 Introduction to Computing Systems Engineering. Computer Architecture

EP1200 Introduction to Computing Systems Engineering. Computer Architecture EP1200 Introduction to omputing Systems Engineering omputer Architecture Perspective on Machine and Assembly Languages Hack is a simple machine language Designed for the simple Hack computer architecture

More information

LECTURE 4. Logic Design

LECTURE 4. Logic Design LECTURE 4 Logic Design LOGIC DESIGN The language of the machine is binary that is, sequences of 1 s and 0 s. But why? At the hardware level, computers are streams of signals. These signals only have two

More information

Arithmetic Logic Unit (ALU)

Arithmetic Logic Unit (ALU) Arithmetic Logic Unit (ALU) Introduction to Computer Yung-Yu Chuang with slides by Sedgewick & Wayne (introcs.cs.princeton.edu), Nisan & Schocken (www.nand2tetris.org) and Harris & Harris (DDCA) Let's

More information

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal. Hardware CSCE 101 Electricity: Voltage Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal. The signals voltage will either be between

More information

Code No: R Set No. 1

Code No: R Set No. 1 Code No: R059210504 Set No. 1 II B.Tech I Semester Regular Examinations, November 2006 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems

More information

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library 3.1 Combinational Circuits 2 Chap 3. logic circuits for digital systems: combinational vs sequential Combinational Logic Design Combinational Circuit (Chap 3) outputs are determined by the present applied

More information

register:a group of binary cells suitable for holding binary information flip-flops + gates

register:a group of binary cells suitable for holding binary information flip-flops + gates 9 차시 1 Ch. 6 Registers and Counters 6.1 Registers register:a group of binary cells suitable for holding binary information flip-flops + gates control when and how new information is transferred into the

More information

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method SET - 1 1. a) Convert the decimal number 250.5 to base 3, base 4 b) Write and prove de-morgan laws c) Implement two input EX-OR gate from 2 to 1 multiplexer (3M) d) Write the demerits of PROM (3M) e) What

More information

Code No: R Set No. 1

Code No: R Set No. 1 Code No: R059210504 Set No. 1 II B.Tech I Semester Supplementary Examinations, February 2007 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science

More information

Control and Datapath 8

Control and Datapath 8 Control and Datapath 8 Engineering attempts to develop design methods that break a problem up into separate steps to simplify the design and increase the likelihood of a correct solution. Digital system

More information

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics Chapter 4 Objectives Learn the components common to every modern computer system. Chapter 4 MARIE: An Introduction to a Simple Computer Be able to explain how each component contributes to program execution.

More information

Combinational Logic II

Combinational Logic II Combinational Logic II Ranga Rodrigo July 26, 2009 1 Binary Adder-Subtractor Digital computers perform variety of information processing tasks. Among the functions encountered are the various arithmetic

More information

1. Draw general diagram of computer showing different logical components (3)

1. Draw general diagram of computer showing different logical components (3) Tutorial 1 1. Draw general diagram of computer showing different logical components (3) 2. List at least three input devices (1.5) 3. List any three output devices (1.5) 4. Fill the blank cells of the

More information

1. Internal Architecture of 8085 Microprocessor

1. Internal Architecture of 8085 Microprocessor 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within up to carry out the instruction, which has been decoded. In reality causes certain connections between blocks of the

More information

Appendix A: Hardware Description Language (HDL) 1

Appendix A: Hardware Description Language (HDL) 1 Appendix A: HDL 1 Appendix A: Hardware Description Language (HDL) 1 Intelligence is the faculty of making artificial objects, especially tools to make tools. Henry Bergson, (1859-1941) A Hardware Description

More information

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali Objectives: Chapter 3 : 1- Boolean Algebra Boolean Expressions Boolean Identities Simplification of Boolean Expressions Complements Representing Boolean Functions 2- Logic gates 3- Digital Components 4-

More information

Boolean Arithmetic. Building a Modern Computer From First Principles.

Boolean Arithmetic. Building a Modern Computer From First Principles. Boolean Arithmetic Building a Modern Computer From First Principles www.nand2tetris.org Elements of Computing Systems, Nisan & Schocken, MIT Press, www.nand2tetris.org, Chapter 2: Boolean Arithmetic slide

More information

Computer Architecture 2/26/01 Lecture #

Computer Architecture 2/26/01 Lecture # Computer Architecture 2/26/01 Lecture #9 16.070 On a previous lecture, we discussed the software development process and in particular, the development of a software architecture Recall the output of the

More information

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1] FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language Reference: [] FIELD PROGRAMMABLE GATE ARRAY FPGA is a hardware logic device that is programmable Logic functions may be programmed

More information

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital

More information

Digital Systems. John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC. December 6, 2012

Digital Systems. John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC. December 6, 2012 Digital Systems John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC December 6, 2012 Contents 1 Logic Gates 3 1.1 Logic Gate............................. 3 1.2 Truth

More information

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture CS429: Computer Organization and Architecture Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: January 2, 2018 at 11:23 CS429 Slideset 5: 1 Topics of this Slideset

More information

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE One and a half hours Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Fundamentals of Computer Engineering Date: Thursday 21st January 2016 Time: 14:00-15:30 Answer BOTH Questions

More information

STEVEN R. BAGLEY THE ASSEMBLER

STEVEN R. BAGLEY THE ASSEMBLER STEVEN R. BAGLEY THE ASSEMBLER INTRODUCTION Looking at how to build a computer from scratch Started with the NAND gate and worked up Until we can build a CPU Reached the divide between hardware and software

More information

R10. II B. Tech I Semester, Supplementary Examinations, May

R10. II B. Tech I Semester, Supplementary Examinations, May SET - 1 1. a) Convert the following decimal numbers into an equivalent binary numbers. i) 53.625 ii) 4097.188 iii) 167 iv) 0.4475 b) Add the following numbers using 2 s complement method. i) -48 and +31

More information

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( ) 6. Combinational Circuits George Boole (85 864) Claude Shannon (96 2) Signals and Wires Digital signals Binary (or logical ) values: or, on or off, high or low voltage Wires. Propagate digital signals

More information

Question Total Possible Test Score Total 100

Question Total Possible Test Score Total 100 Computer Engineering 2210 Final Name 11 problems, 100 points. Closed books, closed notes, no calculators. You would be wise to read all problems before beginning, note point values and difficulty of problems,

More information

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016 CS 31: Intro to Systems Digital Logic Kevin Webb Swarthmore College February 2, 2016 Reading Quiz Today Hardware basics Machine memory models Digital signals Logic gates Circuits: Borrow some paper if

More information

CS3350B Computer Architecture Winter 2015

CS3350B Computer Architecture Winter 2015 CS3350B Computer Architecture Winter 2015 Lecture 5.5: Single-Cycle CPU Datapath Design Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design, Patterson

More information

Two-Level CLA for 4-bit Adder. Two-Level CLA for 4-bit Adder. Two-Level CLA for 16-bit Adder. A Closer Look at CLA Delay

Two-Level CLA for 4-bit Adder. Two-Level CLA for 4-bit Adder. Two-Level CLA for 16-bit Adder. A Closer Look at CLA Delay Two-Level CLA for 4-bit Adder Individual carry equations C 1 = g 0 +p 0, C 2 = g 1 +p 1 C 1,C 3 = g 2 +p 2 C 2, = g 3 +p 3 C 3 Fully expanded (infinite hardware) CLA equations C 1 = g 0 +p 0 C 2 = g 1

More information

MLR Institute of Technology

MLR Institute of Technology MLR Institute of Technology Laxma Reddy Avenue, Dundigal, Quthbullapur (M), Hyderabad 500 043 Course Name Course Code Class Branch ELECTRONICS AND COMMUNICATIONS ENGINEERING QUESTION BANK : DIGITAL DESIGN

More information

(ii) Simplify and implement the following SOP function using NOR gates:

(ii) Simplify and implement the following SOP function using NOR gates: DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EE6301 DIGITAL LOGIC CIRCUITS UNIT I NUMBER SYSTEMS AND DIGITAL LOGIC FAMILIES PART A 1. How can an OR gate be

More information

2.2 THE MARIE Instruction Set Architecture

2.2 THE MARIE Instruction Set Architecture 2.2 THE MARIE Instruction Set Architecture MARIE has a very simple, yet powerful, instruction set. The instruction set architecture (ISA) of a machine specifies the instructions that the computer can perform

More information

CS 101, Mock Computer Architecture

CS 101, Mock Computer Architecture CS 101, Mock Computer Architecture Computer organization and architecture refers to the actual hardware used to construct the computer, and the way that the hardware operates both physically and logically

More information

Computer and Hardware Architecture I. Benny Thörnberg Associate Professor in Electronics

Computer and Hardware Architecture I. Benny Thörnberg Associate Professor in Electronics Computer and Hardware Architecture I Benny Thörnberg Associate Professor in Electronics Hardware architecture Computer architecture The functionality of a modern computer is so complex that no human can

More information

Continuing with whatever we saw in the previous lectures, we are going to discuss or continue to discuss the hardwired logic design.

Continuing with whatever we saw in the previous lectures, we are going to discuss or continue to discuss the hardwired logic design. Computer Organization Part I Prof. S. Raman Department of Computer Science & Engineering Indian Institute of Technology Lecture 10 Controller Design: Micro programmed and hard wired (contd) Continuing

More information

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator Richland College Engineering Technology Rev. 0. Donham Rev. 1 (7/2003) J. Horne Rev. 2 (1/2008) J. radbury Digital Fundamentals CETT 1425 Lab 6 2 s Complement / Digital Calculator Name: Date: Objectives:

More information

Fundamentals of Computer Systems

Fundamentals of Computer Systems Fundamentals of Computer Systems Combinational Logic Martha. Kim Columbia University Spring 6 / Combinational Circuits Combinational circuits are stateless. Their output is a function only of the current

More information

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015 CS 31: Intro to Systems Digital Logic Kevin Webb Swarthmore College February 3, 2015 Reading Quiz Today Hardware basics Machine memory models Digital signals Logic gates Circuits: Borrow some paper if

More information

Sequential Logic. Building a Modern Computer From First Principles.

Sequential Logic. Building a Modern Computer From First Principles. Sequential Logic Buildg a Modern Computer From First Prciples www.nand2tetris.org Elements of Computg Systems, Nisan & Schocken, MIT Press, www.nand2tetris.org, Chapter 3: Sequential Logic slide 1 Usage

More information

COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK SUBJECT CODE & NAME: EC 1312 DIGITAL LOGIC CIRCUITS UNIT I

COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK SUBJECT CODE & NAME: EC 1312 DIGITAL LOGIC CIRCUITS UNIT I KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK SUBJECT CODE & NAME: EC 1312 DIGITAL LOGIC CIRCUITS YEAR / SEM: III / V UNIT I NUMBER SYSTEM & BOOLEAN ALGEBRA

More information

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 00 0 ELECTRONICS AND COMMUNICATIONS ENGINEERING QUESTION BANK Course Name : DIGITAL DESIGN USING VERILOG HDL Course Code : A00 Class : II - B.

More information

(Refer Slide Time: 00:01:53)

(Refer Slide Time: 00:01:53) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 36 Design of Circuits using MSI Sequential Blocks (Refer Slide Time:

More information

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8 CSCB58 - Lab 3 Latches, Flip-flops, and Registers Learning Objectives The purpose of this exercise is to investigate the fundamental synchronous logic elements: latches, flip-flops, and registers. Prelab

More information

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0 1. The number of level in a digital signal is: a) one b) two c) four d) ten 2. A pure sine wave is : a) a digital signal b) analog signal c) can be digital or analog signal d) neither digital nor analog

More information

Elements of Computing Systems, Nisan & Schocken, MIT Press. Boolean Arithmetic

Elements of Computing Systems, Nisan & Schocken, MIT Press. Boolean Arithmetic Elements of Computing Systems, Nisan & Schocken, MIT Press www.idc.ac.il/tecs Boolean Arithmetic Usage and Copyright Notice: Copyright 2005 Noam Nisan and Shimon Schocken This presentation contains lecture

More information

CS 261 Fall Mike Lam, Professor. Logic Gates

CS 261 Fall Mike Lam, Professor. Logic Gates CS 261 Fall 2016 Mike Lam, Professor Logic Gates The final frontier Java programs running on Java VM C programs compiled on Linux Assembly / machine code on CPU + memory??? Switches and electric signals

More information

ELCT 501: Digital System Design

ELCT 501: Digital System Design ELCT 501: Digital System Lecture 4: CAD tools (Continued) Dr. Mohamed Abd El Ghany, Basic VHDL Concept Via an Example Problem: write VHDL code for 1-bit adder 4-bit adder 2 1-bit adder Inputs: A (1 bit)

More information

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3 UNIT - I PART A (2 Marks) 1. Using Demorgan s theorem convert the following Boolean expression to an equivalent expression that has only OR and complement operations. Show the function can be implemented

More information

Segment 1A. Introduction to Microcomputer and Microprocessor

Segment 1A. Introduction to Microcomputer and Microprocessor Segment 1A Introduction to Microcomputer and Microprocessor 1.1 General Architecture of a Microcomputer System: The term microcomputer is generally synonymous with personal computer, or a computer that

More information

One and a half hours. Section A is COMPULSORY

One and a half hours. Section A is COMPULSORY One and a half hours Section A is COMPULSORY An additional answersheet is provided for Question 4. Please remember to complete the additional answersheet with your University ID number and attach it to

More information

9. Programmable Machines

9. Programmable Machines 9. Programmable Machines 6.004x Computation Structures Part 2 Computer Architecture Copyright 2015 MIT EECS 6.004 Computation Structures L09: Programmable Machines, Slide #1 Example: Factorial factorial(n)

More information

CS Computer Architecture

CS Computer Architecture CS 35101 Computer Architecture Section 600 Dr. Angela Guercio Fall 2010 Computer Systems Organization The CPU (Central Processing Unit) is the brain of the computer. Fetches instructions from main memory.

More information

Introduction. Chapter 4. Instruction Execution. CPU Overview. University of the District of Columbia 30 September, Chapter 4 The Processor 1

Introduction. Chapter 4. Instruction Execution. CPU Overview. University of the District of Columbia 30 September, Chapter 4 The Processor 1 Chapter 4 The Processor Introduction CPU performance factors Instruction count etermined by IS and compiler CPI and Cycle time etermined by CPU hardware We will examine two MIPS implementations simplified

More information

Why Should I Learn This Language? VLSI HDL. Verilog-2

Why Should I Learn This Language? VLSI HDL. Verilog-2 Verilog Why Should I Learn This Language? VLSI HDL Verilog-2 Different Levels of Abstraction Algorithmic the function of the system RTL the data flow the control signals the storage element and clock Gate

More information

Introduction to Computer Engineering. CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison

Introduction to Computer Engineering. CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison Introduction to Computer Engineering CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison Chapter 4 The Von Neumann Model The Stored Program Computer 1943: ENIAC Presper

More information

Injntu.com Injntu.com Injntu.com R16

Injntu.com Injntu.com Injntu.com R16 1. a) What are the three methods of obtaining the 2 s complement of a given binary (3M) number? b) What do you mean by K-map? Name it advantages and disadvantages. (3M) c) Distinguish between a half-adder

More information

Stephen Churcher, Tom Kean, and Bill Wilkie Xilinx Inc. (presented by Raj Patel)

Stephen Churcher, Tom Kean, and Bill Wilkie Xilinx Inc. (presented by Raj Patel) The XC6200 astmap TM Processor Interface Stephen Churcher, Tom Kean, and ill Wilkie Xilinx Inc. (presented by Raj Patel) bstract The Xilinx XC6200 is the first commercially available PG to be specifically

More information

Code No: R Set No. 1

Code No: R Set No. 1 Code No: R059210504 Set No. 1 II B.Tech I Semester Regular Examinations, November 2007 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems

More information