04-numbers

04-numbers - CS216 Program and Data Representation...

Info iconThis preview shows pages 1–17. Sign up to view the full content.

View Full Document Right Arrow Icon
CS216: Program and Data Representation University of Virginia Computer Science Spring 2009 Aaron Bloomfield Numbers And their Representation
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Numbers • Background and terminology – Numbers vs. numerals • Positional number systems – Radix conversion – Binary, octal, hexadecimal • Number representation on machines – Endianness – Type representation (sign magnitude, 2’s complement, excess 8) – IEEE floating point representation
Background image of page 2
Numbers vs. Numerals and Positional Number Systems
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Numbers vs. Numerals • Which is bigger? 5 8 12 • Which is “five”? five V cinq 101 Numerals represent numbers
Background image of page 4
5 Positional Number Systems • Integers • 346 = 3*10 2 + 4*10 1 + 6*10 0 • 346 = 2 8 + 2 6 + 2 4 + 2 3 + 2 1 •Real Radix Point Radix
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Examples • Binary (base 2): 1111 2 • Ternary (base 3): 120 3 • Octal (base 8): 17 8 • Hexadecimal (base 16): F
Background image of page 6
Converting Between Different Radixes
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Conversion • Radix R to Decimal • Decimal to Radix R
Background image of page 8
9 Radix to Decimal • 42 5 • 121 3
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Decimal to Radix • 42 10 to radix 5 • 121 10 to radix 11
Background image of page 10
Number Representations on Machines
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 Representing Numbers on Computers • Limited resources to represent numbers Not all numbers can be represented
Background image of page 12
13 ENIAC • Started 1943 – early electronic programmable computer • Operational in 1946 • Computed ballistics tables • 17,468 vacuum tubes • 150 kW of power Earlier Computers: Z3 (Konrad Zuse) 1941 Colossus 1943
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
14 Directions for Getting 6 1. Choose any regular accumulator (ie. Accumulator #9). 2. Direct the Initiating Pulse to terminal 5i . 3. The initiating pulse is produced by the initiating unit's Io terminal each time the Eniac is started. This terminal is usually, by default, plugged into Program Line 1-1 (described later). Simply connect a program cable from Program Line 1-1 to terminal on this Accumulator. 4. Set the Repeat Switch for Program Control 5 to 6. 5. Set the Operation Switch for Program Control 5 to ADD . 6. Set the Clear-Correct switch to C. 7. Turn on and clear the Eniac. 8. Normally, when the Eniac is first started, a clearing process is begun. If the Eniac had been previously started, or if there are random neons illuminated in the accumulators, the ``Initial Clear'' button of the Initiating device can be pressed. 9. Press the ``Initiating Pulse Switch'' that is located on the Initiating device. 10.Stand back.
Background image of page 14
15 ENIAC Number Representation • Decimal system – Ring of 36 vacuum tubes to store one digits (10 flip-flops to store 0-9) – Designed to emulate mechanical adding machine electronically – 20 accumulators (~registers), each stores 10- digits • 5,000 cycles per second – Perform addition/subtraction between 2 accumulators each cycle
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Binary Number Representations • First presented by Gottfried Leibniz, 1705 (“Explication de l’Arithmétique Binaire”) • George Boole (“Boolean” logic), 1854 • Claude Shannon’s 1937 Master’s thesis: implemented Boolean algebra with switches and relays • Used by Atanasoff-Berry Computer, Colossus and Z3
Background image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 66

04-numbers - CS216 Program and Data Representation...

This preview shows document pages 1 - 17. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online