04-numbers

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

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

CS216: Program and Data Representation University of Virginia Computer Science Spring 2009 Aaron Bloomfield Numbers And their Representation

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

View Full Document
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
Numbers vs. Numerals and Positional Number Systems

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

View Full Document
4 Numbers vs. Numerals • Which is bigger? 5 8 12 • Which is “five”? five V cinq 101 Numerals represent numbers
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

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

View Full Document
6 Examples • Binary (base 2): 1111 2 • Ternary (base 3): 120 3 • Octal (base 8): 17 8 • Hexadecimal (base 16): F

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

View Full Document
8 Conversion • Radix R to Decimal • Decimal to Radix R
9 Radix to Decimal • 42 5 • 121 3

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

View Full Document
Number Representations on Machines

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

View Full Document
12 Representing Numbers on Computers • Limited resources to represent numbers Not all numbers can be represented
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

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

View Full Document
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.
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

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online