The document discusses how information is represented digitally using binary systems. It explains that computers combine the physical world with the logical world by associating true with presence and false with absence. This allows computers to use physical signals to represent logical symbols. It then discusses how binary digits (bits) are used to represent numbers, characters, and other data digitally through various encoding systems like ASCII.
2. Bits of Theory/Bytes of Practice
-- A.K. Dewdney
Logic is the foundation of both reasoning
and computing.
By associating true with presence & false
with absence, we can use the physical
world [signals] to model the logical world
(symbols), and vice-versa.
This [is the Fundamental Principle of]
Information Technology.
-- p. 195, Ch. 8, FIT5
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
3. Fundament Principle of IT
Logic is the foundation of both reasoning
and computing.
Web Field Trip
Logic Gates: Logical AND
(http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/and.html)
=> Nine Rungs of the IT Inferno
(http://ix.cs.uoregon.edu/~michaelh/110/inferno.html)
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
4. Digitizing Information
represent information with digits
Digit: 0 .. 9 (Decimal Digit)
Digitizing: use whole numbers as symbols
BIT: 0 .. 1 (BInary digiT)
Hex Digit: 0 .. 9, A .. F
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
5. Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
6. Fundamental Information
Representation
Computers: combine the physical (actual)
world with the logical (virtual) world
Representation => from signal to symbol
Physical world: the most fundamental form
of information is presence or absence
P/A, On/Off, 1/0, T/F
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
7. Fundamental Information
Representation
In the logical world, concepts of true (T)
and false (F) are important
Logic: foundation of reasoning
Logic: foundation of computing
The physical world (machines) can
represent the logical world by associating
true with the Presence of a phenomenon
and false with its Absence
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
8. The PandA Representation
PandA: the code used for two bits of
physical information:
Presence
Absence
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
9. The PandA Representation
The presence or absence can be viewed
as true or false
Such a formulation is said to be discrete
vs. continuous
Signals are continuous
Symbols are discrete
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
10. A Binary System
The PandA encoding
has two bits: present &
absent
Two bits make binary
There is no law that
says on means
present or off
means absent
convention
interpretation
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
11. Bits Form Symbols
The PandA unit is a bit
binary digit
Bit sequences can be interpreted as
numbers or other information
Groups of bits can represent symbols
(eg) ASCII Character Code
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
12. Bits in Computer Memory
Memory is arranged inside a computer in a
very long sequence of bits
Memory locations are electronic (RAM)
Bits are stored as Presence/Absence
Symbolic representation: 1/0
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
13. Sidewalk Memory
sidewalk: strip of concrete with lines across
it forming squares
presence of a stone: 1
absence of a stone: 0
=> sidewalk: a sequence of bits
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
14. Sidewalk Memory
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
16. Sidewalk Memory
To write a 1: put a stone on a square
To write a 0: sweep the sidewalk square
clean
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
17. Alternative PandA Encodings
There is no limit to the ways to encode two
physical states
One if by land, Two if by sea.
Paul Revere Code
Binary
Git, Whoa!
Conestoga Code
Binary
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
18. Encoding Information w/ Bit
Patterns
bit patterns of length 1:
=> encode 2 symbols
bit patterns of length 2:
=> encode 4 symbols
bit patterns of length 3:
=> encode 8 symbols
...
bit patterns of length n:
=> 2n symbols
adding 1 bit doubles number of
patterns
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
19. Bit Patterns of Length 4 = One Hex Digit
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
20. Hex Digits Explained
hexadecimal digits are base-16 numbers
(24 = 16)
using bit patterns is tedious & error prone
1111 1111 1001 1000 1110 0010 1010 1101
one hex digit = 4 bits
=> shorthand representation
FF98E2AD
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
21. Hex to Bits and Back Again
Easy to translate between hex and binary
0010 1011 1010 1101
2
B
A
D
F
A
B
4
1111 1010 1011 0100
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
22. Digitizing Numbers using Binary
The two earliest uses of PandA were to:
Encode numbers
Encode keyboard characters
Same principles apply to sound, images,
video, etc.
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
23. Decimal Numbers, Place Values
numbers use a place value representation
each place represents a power of 10
(binary numbers use powers of 2)
1,010 in decimal:
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
24. Binary Numbers, Place Values
10102
= (1 8) + (0 4) + (1 2) + (0 1)
= 1010
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
25. Binary Numbers, Place Values
1,01010 = 0011 1111 00102
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
26. Digitizing Text
The number of bits determines the number
of symbols that can be represented
bit patterns of length n
=> 2n symbols
The more symbols you want encoded, the
more bits you need
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
27. Digitizing Text (Characters)
To represent 95 distinct symbols
uppercase, lowercase, digits, punctuation,
etc.
we need 7 bits
26 = 64 symbols
27 = 128 symbols
plus additional characters
=> ASCII-8 Character Code
28 = 256 symbols
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
28. Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
29. Extended ASCII: An 8-Bit Code
Handling other languages is solved in two
ways:
ASCII-8
Unicode-16
IBM named 8-bit sequence a byte
ASCII-8: One Byte/One Character
RAM: one memory location = 4 Bytes
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
30. Why Byte?
IBM was building a supercomputer, called
Stretch
They needed a word for a quantity of
memory between a bit and a word
A word of computer memory is currently 32
bits
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
31. Why Byte?
Then, why not bite?
The i to a y was done so that someone
couldnt accidentally change byte to bit
by the dropping the e
bite
byte
bit
byt
(the meaning changes)
(whats a byt?)
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13
32. Ch. 7 Assessment:
Learning Outcomes - Know the following
Copyright 息 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Monday, October 28, 13