fall 2012: fcm 708 foundation i lecture 2 prof. shamik sengupta email: [email protected]

22
Fall 2012: FCM 708 Fall 2012: FCM 708 Foundation I Foundation I Lecture 2 Lecture 2 Prof. Shamik Sengupta Email: [email protected]

Upload: amberly-perkins

Post on 31-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Fall 2012: FCM 708 Fall 2012: FCM 708 Foundation IFoundation I

Lecture 2Lecture 2

Prof. Shamik Sengupta

Email: [email protected]

Page 2: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Quick Recap…

Intro to Computer Architecture:

– Number system– Decimal, Binary, Hexadecimal

– Unsigned and signed representations

– Hardware architecture– A simplified model of the microprocessor structure

– Central Processing Unit (CPU)

– Arithmetic & Logic Unit (ALU)

– Control Unit (CU)

– Register Array

– System Bus

– Memory

– Overview of Instruction Execution Cycle

FCM 708: Sengupta

Page 3: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

A quick look at a microprocessor architecture

Let us have some hand-on experience of what we have learnt so far

We will use a simple microprocessor simulator– Motorola 68HC11

FCM 708: Sengupta

Page 4: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Boolean algebra and Logic gatesBoolean algebra and Logic gates

Page 5: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Objectives

Understand the relationship between Boolean logic

and digital computer circuits

Learn how to design simple logic circuits.

Understand how digital circuits work together to form

complex computer systems.

FCM 708: Sengupta

Page 6: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Introduction

In the latter part of the nineteenth century, George Boole showed that logical thought could be represented through mathematical equations

Computers, as we know them today, are implementations of Boole’s Laws of Thought– John Atanasoff and Claude Shannon were among the first to see

this connection

FCM 708: Sengupta

Page 7: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

What is Boolean algebra

Boolean algebra is an algebra for the manipulation of objects that can take on only two values, typically true and false

Why Boolean algebra is so useful in computers?– Because computers are built as collections of gates that are either “on”

or “off,” Boolean algebra is a very natural way to represent digital information or compute information

Boolean functions are implemented in digital computer circuits called gates (logic gates)– A gate is an electronic device that produces a result based on two or

more input values– All the microprocessor components are combinations of such logic gates

FCM 708: Sengupta

Page 8: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Boolean Operators

Most common Boolean operators are AND, OR and NOT

A Boolean operator can be completely described using a truth table

The truth table for the Boolean operators AND, OR and NOT are shown here

FCM 708: Sengupta

Page 9: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

The three simplest gates are the AND, OR, and NOT gates.

They correspond directly to their respective Boolean operations, as you can see by their truth tables

And these representations map exactly into the electric circuits of a digital system

Logic Gates

FCM 708: Sengupta

Page 10: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Detailed implementation picture of a Logic Gate

Voltage inverted from input

Voltage from input

This is the logic for an AND gate

74LS08Quad 2-input AND

FCM 708: Sengupta

Page 11: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

The output of the XOR operation is true only when the values of the inputs differ.

Logic Gates

Note the special symbol for the XOR operation. • Symbols for NAND and NOR, and

truth tables are shown at the right.

FCM 708: Sengupta

Three other logic gates:

Page 12: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Logic Gates

NAND is known as universal gate because they are inexpensive to manufacture and any Boolean function can be constructed using only NAND gates.

FCM 708: Sengupta

Page 13: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Boolean Functions

Boolean functions are composed of Boolean variables and multiple logic operators

NOT has the precedence over AND AND has the precedence over OR

FCM 708: Sengupta

Page 14: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Boolean Functions

Digital computers contain circuits that implement Boolean functions.

The simpler that we can make a Boolean function, the smaller the circuit that will result.– Simpler circuits are cheaper to build, consume less power,

and run faster than complex circuits.

With this in mind, we always want to reduce our Boolean functions to their simplest form.– Boolean identities

FCM 708: Sengupta

Page 15: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Most Boolean identities have an AND (product) form as well as an OR (sum) form.

We show our identities using both forms. Our first group is rather intuitive:

Boolean identities

FCM 708: Sengupta

Page 16: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Our second group of Boolean identities should be familiar to you from your study of algebra:

Boolean identities

FCM 708: Sengupta

Page 17: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Our last group of Boolean identities are perhaps the most useful.

Boolean identities

FCM 708: Sengupta

Page 18: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Simplification of Boolean Functions

Let’s try some of these identities to simplify Boolean Functions:

F = AB + BBC + BCC

F = A + B(A+C) + AC

FCM 708: Sengupta

Page 19: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Simplify the function:

Simplification of Boolean Functions

FCM 708: Sengupta

Page 20: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Hand-on Practice

Multimedia Logic Simulator

Can be downloaded from http://www.softronix.com/logic.html

We will implement some of the simplest logic circuits

FCM 708: Sengupta

Page 21: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Digital Circuits and Boolean Algebra

Using Boolean algebra to design various important digital circuits implementation

– Designing a Burglar alarm

– Designing an adder

FCM 708: Sengupta

Page 22: Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta Email: ssengupta@jjay.cuny.edu

Reading Assignment

1. Boolean Algebra (In Blackboard)

FCM 708: Sengupta