11
Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Embed Size (px)

Citation preview

Page 1: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Introduction toComputer Science

David Goldschmidt, Ph.D.Computer Science

The College of Saint Rose

CIS 111 06September 6, 2007

Page 2: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Binary Logic

At its lowest level, a computer operates on electrical current Voltage levels indicate ON or OFF An ON state represents binary digit 1 An OFF state represents binary digit 0

We use binary logic to describe binary variables and how they are processed Such processing is done by logical

circuits called gates

Page 3: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

LogicGates

http://www.inetdaemon.com/tutorials/theory/number_systems/binary/gates.shtml

A logic gate is a logic device that accepts one or more binary inputs and produces one binary output

We combine these logic gates to build integrated circuits

Page 4: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Integrated Circuits (i)

Consider the following integrated circuit (IC):

What is x when A = 0, B = 1, and C = 1? What is x when A = 1, B = 1, and C = 1? What is x when A = 0, B = 0, and C = 0?

Page 5: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Integrated Circuits (ii)

Given the inputs to the following IC, what is x?

Page 6: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Boolean Logic Expressions (i)

http://www.inetdaemon.com/tutorials/theory/number_systems/binary/gates.shtml

We can write boolean logic expressions using the algebraic function notation from the chart

Page 7: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Boolean Logic Expressions (ii)

Consider the following IC:

The boolean logic expression is:

Write the truth table

_x = AB + C

Page 8: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Boolean Logic Expressions (iii)

Consider the following IC:

The boolean logic expression is:

Write the truth table

_ _x = AB(C + D)

Page 9: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Boolean Logic Expressions (iv)

Consider the following IC:

The boolean logic expression is:

Write the truth table

_x = A(A + B)

Page 10: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Boolean Logic Expressions (v)

Draw integrated circuits for the following boolean logic expressions:

_ _x = ABC _x = AB(C + D) _x = (A + B)(C + D) x = ABC

Write truth tables

for these ICs

Page 11: Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 111 06 September 6, 2007

Using the “Logg-O” Applet

Access Logg-O from the Analytical Engine CD or click on the image to go to the Web:

Get into teams of two or three

Do Lab 7.1 and Lab 7.2

Use “print-screen” to copy your answers into a Word document