Professional Documents
Culture Documents
Good luck!
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 1 ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 2
Represent One Type of Information with Another Follow These Simple Instructions
We often represent one type of information
with other patterns, physical quantities, and
so forth.
examples
◦ English letters represented by drawn
patterns
◦ colors represented by variations in radio Please do so for the rest of today’s lecture.
signal amplitude
The mapping from one form to another
is called a representation. You thought I was kidding?
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 3 ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 4
8/16/2018
Knowing the Representation May Help You What Do We Need to Make a Representation Useful?
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 5 ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 6
First Answer: Representations Must be Well-Defined Some Mappings May Not be Usable by Computers
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 7 ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 8
8/16/2018
Second Answer: Representations Must be Unambiguous But Some Patterns May Represent Nothing
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 9 ECE 120: Introduction to Computing © 2016-2017 Steven S. Lumetta. All rights reserved. slide 10
Computers are Based on Electrons Computer Representations are Based on BInary digiTs
(voltage)
How many electrons are in a certain
place? (related closely to voltage) Voltage near Vdd is a “1.”
So… Voltage near 0V is a “0.”
◦ Choose a ground: 0V by definition. 0 0
◦ Pick a higher voltage (called Vdd). 0V The location thus holds a binary 0V
digit, which we call a bit.
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 11 ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 12
8/16/2018
Physical Locations Enable Place Value Represented by What? The Answer is Always “Bits”
(voltage)
decimal binary
◦ No decimal, no hexadecimal, no
26 11010 letters, no real numbers, no colors.
sixteens ones
place place
tens ones ◦ ALL computer representations 0
place place eights twos are based on bits. 0V
fours
place place
place
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 13 ECE 120: Introduction to Computing © 2016-2017 Steven S. Lumetta. All rights reserved. slide 14
A Question for You: How Many Bits do We Need? We Need One Bit Pattern for Each Possible Thing
How many bits do we need to represent a Trick question: How many bits do we need
whole number in the range… to represent two books?
◦ The Collected Works of Shakespeare
◦ from 0 to 31? ◦ Our textbook by Patt & Patel
◦ 32 different integers
◦ so we need 5 bits (25 = 32 bit patterns) ◦ 2 different books
◦ so we need only 1 bit! (21 = 2 bit patterns)
◦ from 0 to 100?
◦ 101 different integers What matters is the number of things,
◦ so we need 7 bits (27 = 128 bit patterns) not what those things are.
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 15 ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 16
8/16/2018
ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 17 ECE 120: Introduction to Computing © 2016 Steven S. Lumetta. All rights reserved. slide 18