Last Time. AND/OR/NOT DeMorgan s Law

Similar documents
Chapter 3 Digital Logic Structures

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers

Lecture 4 - Digital Representations III + Transistors

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates

(CSC-3501) Lecture 6 (31 Jan 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Chapter 3. H/w s/w interface. hardware software Vijaykumar ECE495K Lecture Notes: Chapter 3 1

EECS150 - Digital Design Lecture 28 Course Wrap Up. Recap 1

Problem 4.R1: Best Range

Chapter 3 Digital Logic Structures

Chapter 1: Digital logic

Chapter 3 Describing Logic Circuits Dr. Xu

Practice 6: CMOS Digital Logic

Logic Design I (17.341) Fall Lecture Outline

Encoders. Lecture 23 5

Introduction (concepts and definitions)

05/11/2006. Lecture What does a computer do? Logic Manipulation. Data manipulation

Game Playing Part 1 Minimax Search

Analog, Digital, and Logic

Logic diagram: a graphical representation of a circuit

Digital Systems Principles and Applications TWELFTH EDITION. 3-3 OR Operation With OR Gates. 3-4 AND Operations with AND gates

Digital Fundamentals

Lecture 2: Digital Logic Basis

BOOLEAN ALGEBRA AND LOGIC FAMILIES

Topic Notes: Digital Logic

Observing a colour and a spectrum of light mixed by a digital projector

Lecture #1. Course Overview

Electrical Engineering 40 Introduction to Microelectronic Circuits

2 Logic Gates THE INVERTER. A logic gate is an electronic circuit which makes logic decisions. It has one output and one or more inputs.

Classic Dominoes. Number of Players: 2-4

CS 4700: Artificial Intelligence

The Non Inverting Buffer

Asst. Prof. Thavatchai Tayjasanant, PhD. Power System Research Lab 12 th Floor, Building 4 Tel: (02)

R.B.V.R.R. WOMEN S COLLEGE (AUTONOMOUS) Narayanaguda, Hyderabad. ELECTRONIC PRINCIPLES AND APPLICATIONS

CS302 - Digital Logic Design Glossary By

ECE 2300 Digital Logic & Computer Organization

QUIZ. What do these bits represent?

CSCI "Decoders & Demultiplexers"

Grade 7/8 Math Circles Game Theory October 27/28, 2015

Digital Logic Circuits

Name: Class: Date: 1. As more electronic systems have been designed using digital technology, devices have become smaller and less powerful.

COMPUTER ORGANIZATION & ARCHITECTURE DIGITAL LOGIC CSCD211- DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF GHANA

Specification Due Date: Friday April 7 at 6am Top-down Program Outline Due Date: Wednesday April 19 at 6am Program Due Date: Monday May 15 at 6am

ECE380 Digital Logic

(c) Figure 1.1: Schematic elements. (a) Voltage source. (b) Light bulb. (c) Switch, open (off). (d) Switch, closed (on).

Digital Logic. Software. Digital Logic. Boolean value (bit): 0 or 1. Transistors (more in lab) 1/26/16. Program, Application. Programming Language

Lecture 3: Error Handling

Lecture 3: Wireless Physical Layer: Modulation Techniques. Mythili Vutukuru CS 653 Spring 2014 Jan 13, Monday

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

COMPUTER TECHNOLOGY 2015/2016 Exercises. Unit 7

EXPERIMENT NO 1 TRUTH TABLE (1)

ECE 410: VLSI Design Course Lecture Notes (Uyemura textbook)

Gomoku Player Design

Course Overview. Course Overview

Jim and Nim. Japheth Wood New York Math Circle. August 6, 2011

University of Technology

BEE 2233 Digital Electronics. Chapter 1: Introduction

100 (mod ) (3) [Section 1.3 Gauss s trick ]. Find the sum = Explain your method of solution:

Logic and Computer Design Fundamentals. Chapter 6 Selected Design Topics. Part 1 The Design Space

Lab Project #2: Small-Scale Integration Logic Circuits

In this lecture: Lecture 3: Basic Logic Gates & Boolean Expressions

Logic Symbols with Truth Tables INVERTER A B NAND A B C NOR C A B A B C XNOR A B C A B Digital Logic 1

ECE Digital Logic Lecture 2. Digital Design Circuit Types: Combinational vs. Sequential

Unit 3. Logic Design

1/19/2012. Timing in Asynchronous Circuits

DIGITAL LOGIC CIRCUITS

6.1 In this section, you will design (but NOT build) a circuit with 4 inputs,

Background. Game Theory and Nim. The Game of Nim. Game is Finite 1/27/2011

Digital Applications (CETT 1415) Credit: 4 semester credit hours (3 hours lecture, 4 hours lab) Prerequisite: CETT 1403 & CETT 1405

CS/EE 181a 2010/11 Lecture 1

4-bit counter circa bit counter circa 1990

will talk about Carry Look Ahead adder for speed improvement of multi-bit adder. Also, some people call it CLA Carry Look Ahead adder.

ECE380 Digital Logic. Logic values as voltage levels


Command and State Patterns. Curt Clifton Rose-Hulman Institute of Technology

Grade 6 Math Circles Combinatorial Games November 3/4, 2015

Lecture 9 Transistors

Probability, Continued

EECS 150 Homework 4 Solutions Fall 2008

DIGITAL ELECTRONICS QUESTION BANK

Deep Green. System for real-time tracking and playing the board game Reversi. Final Project Submitted by: Nadav Erell

Analysis procedure. To obtain the output Boolean functions from a logic diagram, proceed as follows:

Lecture 33: How can computation Win games against you? Chess: Mechanical Turk

Introduction to Computer Engineering EECS 203 dickrp/eecs203/ Grading scheme. Review.

UC Berkeley CS61C : Machine Structures

ECO 220 Game Theory. Objectives. Agenda. Simultaneous Move Games. Be able to structure a game in normal form Be able to identify a Nash equilibrium

Combinational logic. ! Regular logic: multiplexers, decoders, LUTs and FPGAs. ! Switches, basic logic and truth tables, logic functions

Transistor Digital Circuits

Logic Families. Describes Process used to implement devices Input and output structure of the device. Four general categories.

Combinational Logic Circuits. Combinational Logic

Game Playing. Garry Kasparov and Deep Blue. 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.

hij Teacher Resource Bank GCE Electronics Exemplar Examination Questions ELEC2 Further Electronics

Electronics. Digital Electronics

Surreal Numbers and Games. February 2010

CMOS Inverter & Ring Oscillator

Tangent: Boromean Rings. The Beer Can Game. Plan. A Take-Away Game. Mathematical Games I. Introduction to Impartial Combinatorial Games

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

Domino Static Gates Final Design Report

Bell Labs celebrates 50 years of Information Theory

Lecture 7: Digital Logic

Lecture 1 Introduction to Electronic

Transcription:

Last Time AND/OR/NOT DeMorgan s Law

And, Or, Not The most important logical operations are and, or, and not. x and y is True only if both x and y are True. x or y is True only if either x or y are True. not x is True only if x is False. A lot like their English meanings, but unambiguous.

Relating And/Or/Not Note: not (not x) = x DeMorgan s Law: not flips ands and ors not (x and y) = (not x) or (not y) not (x or y) = (not x) and (not y)

DeMorgan s TV Schedule x: The show airs on Tuesdays y: The show airs on Mondays. not (x or y) The show does not air on Mondays and the show does not air on Tuesdays. The show does not air on Mondays or Tuesdays.

Clicker Questions

Chapter 1: Nuts and Bolts CS105: Great Insights in Computer Science

Multiple Switches A = False B = True C = True D = False

Multiple Switches A = False B = True Switches A and B are wired in parallel: either will light the bulb. C = True D = False

Multiple Switches A = False B = True Switches A and B are wired in parallel: either will light the bulb. C = True D = False Switches C and D are wired in series: both are needed to light the bulb.

Multiple Switches A = False B = True light1 = A or B Switches A and B are wired in parallel: either will light the bulb. C = True D = False Switches C and D are wired in series: both are needed to light the bulb.

Multiple Switches A = False B = True light1 = A or B Switches A and B are wired in parallel: either will light the bulb. C = True D = False light2 = A and B Switches C and D are wired in series: both are needed to light the bulb.

Multiple Circuits A B Special switches allow a single mechanical switch to control two circuits simultaneously.

Multiple Circuits A B light1 = A or B Special switches allow a single mechanical switch to control two circuits simultaneously.

Multiple Circuits A B light1 = A or B light2 = A and B Special switches allow a single mechanical switch to control two circuits simultaneously.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

mininim There s a pile of objects, say 10. On her turn, a player can take away either one or two objects. Players alternate. The player to take the last object wins.

Nim5Bot: Game Tree 5 left Let s start by considering the 5-object version. takeone taketwo We ll design a strategy for the computer C to beat the user U. 3 left 2 left takeone taketwo takeone taketwo C C C U

Further Considerations To win mininim: if possible, remove pieces to leave opponent with a multiple of 3. Why does it work? We win if opponent has 3; if opponent has a multiple of 3, can leave her with next smaller multiple of 3. What if goal is to not take the last object? What if we can take 1, 2, or 3 objects per round? 2 or 3? 1 or 3? Is there a general rule?

Complete Nim5 Logic fiveleft = True threeleft = takeone 1 twoleft = taketwo 1 C-Win = (threeleft and (takeone 2 or taketwo 2 )) or (twoleft and takeone 2 ) U-Win = twoleft and taketwo 2

Nim5 Circuit fiveleft threeleft http://scratch.mit.edu/ projects/cs105/35736 taketwo 2 U-Win takeone 1 taketwo 1 takeone 2 twoleft C-Win

What a Headache! Encoding Nim10 with switches is a nightmare. Why? Since some switches are used in multiple places, needs more than a double-throw switch. Since values are reused, hard to keep track of different circuits. Appears to need a separate circuit for each output: Gets too complex too fast.

Bits, Inside and Out Inputs: Switches A = False Outputs: Lights light1on = False B = True light2on = True

Bits, Inside and Out Inputs: Switches A = False Inside: Logic AND OR Outputs: Lights light1on = False B = True AND AND AND OR OR OR NOT light2on = True NOT

Need a New Approach Let s consider an alternate way of building and and or logic. Makes simple things more complex. Makes complex things much simpler! That s a tradeoff we can deal with.

Electricity Activated Switches Easy to make and and or out of switches, but we need to make switches that other switches can switch!

Switch Switcher A = False A = True lighton = True lighton = False Before, we used switches to control the flow of current; now, we will use current (via electromagnetism) to control switches (which control the flow of current)!

Relay Circuit: A=F, B=F A = False B = False lighton = False

Relay Circuit: A=F, B=T A = False B = True lighton = False

Relay Circuit: A=T, B=F A = True B = False lighton = False

Relay Circuit: A=T, B=T A = True B = True lighton = True

What Is This Thing? A B C False False False False True False True False False True True True A power source B C

What Is This Thing? A B C False False False True True False False False False True True True A. or gate B. and gate C. not gate D. none of these A power source B C

And One For Not We saw several slides ago that a single relay inverts its input signal, turning a True to a False and vice versa. These output summaries are known as truth tables. A False True B = not A A B B True False A NOT GATE B

Abstraction: The Black Box Our new relay-based and and not gates take current, not switches, as input. As a result, they are easier to chain together. The original switch-based scheme did not support this kind of modularity. A NOT GATE AND GATE NOT GATE C B NOT GATE

A Third Black Box A B C False False False False True True True False True True True True A NOT GATE B AND GATE NOT GATE NOT GATE C

A Third Black Box A B C False False False False True True False True A NOT GATE B NOT GATE False True True False True True True True True AND GATE False NOT GATE C

A Third Black Box A B C False False False False True True False True A NOT GATE B NOT GATE True False True False True True True True True AND GATE False NOT GATE C

A Third Black Box A B C False False False False True True True False A NOT GATE B NOT GATE False True True False True True True True True AND GATE False NOT GATE C

A Third Black Box A B C False False False False True True True False A NOT GATE B NOT GATE True False True False True True True True False AND GATE True NOT GATE C

A Third Black Box A B C False False False False True True True False A NOT GATE B NOT GATE True False True False True True True True It s an or gate : a black box built out of other black boxes! False AND GATE True NOT GATE C

Simplified Nim5 Circuit AND GATE U-Win True takeone 1 taketwo 1 takeone 2 taketwo 2 twoleft AND GATE OR GATE OR GATE fiveleft threeleft C-Win AND GATE

How to Make a Gate switches/relays hydraulic valves tinkertoys silicon: semiconductors/ transistors soap bubble DNA quantum material optics nanotubes neurons dominoes legos/marbles

Movie

NOT Gate (v3) 0 0 1 1

Or Gate (v4) 0 1 0 1 0 1 Release bottom row first

Wire, transmitting bits (v1) 0 0 1 1

Could It Work? My domino or gate requires 24 dominoes. The first Pentium processor had 3.3M transistors, or roughly 800K gates. So, perhaps 19M dominoes needed. World record for domino toppling: 4M. Oh, and the Pentium did its computations 60M times a second, whereas dominoes might require a week to set up once.

But There Are Lots of Them ipod: 60Gb. 1Gb = one billion bytes, each of which is 8 bits. Format uses 128 Kbps (kilobits or 1000 bits per second of sound). So, 62,500 minutes of sound or 15,000 songs at 4 minutes per song. Screen: 320x240 pixels, each of which stores 1 byte each of R,G,B intensity (24 bits). That s 76,800 pixels and 1.8M bits. At 30 frames per sec., that s 55.3 million bits per second or 144 min. of (quiet) video.