0% found this document useful (0 votes)
9 views24 pages

01 2 CH7

Uploaded by

unicornshawneya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views24 pages

01 2 CH7

Uploaded by

unicornshawneya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Chapter 7 – Digital Information

• CS170
• Computer Applications for Business

1
2
Chapter 7 – Digital Information

Chapter 7 – Representing Information Digitally


• PandA representation
• Binary system
• Hex notation
• Binary numbers compared with Decimal numbers
• Conversions: Hexadecimal, Decimal, Binary
• Digitizing text: ASCII, Extended ASCII, Unicode
• Metadata

3
Data 01001000 01100101
01101100 01101100
01101111 00101100
00100000 01110111
01101111 01110010
01101100 01100100
00100001

 Digitizing information
◦ data represented as numbers
 the breakthrough!
 machines reading digital info

◦ Census data digitized (1890) - Herman Hollerith


 1880 it took 8 years to process the data by hand
 punch cards digitized the process
4
5
The PandA Representation
We refer to this system as “Presence and
Absence” or PandA.

Such a formulation is said to be discrete

Discrete means “distinct” or “separable”


It is not possible to transform one value into
another by tiny gradations

There are no “shades of gray”

6
A Binary System
• The PandA encoding
has two patterns:
present and absent
• Two patterns make it a
binary system
• There is no law that
says on means
“present” or off means
“absent”
• The PandA unit is
https://code.org/educate/resou
known as a binary digit rces/videos BINARY and DATA
or bit
7
Bits in Computer Memory
• Memory is arranged inside a computer in a
very long sequence of bits
• The physical phenomenon can be encoded,
the information can be set and detected to
present or absent

The “dirty secret”


of electronic 0’s
and 1’s
8
Binary Explained
Computers use base-2 to represent numbers using
the binary number system
When counting in binary you are limited to only use
0 and 1
0, 1, 10, 11, 100, 101, 110, 111, 1000, …

9
Hex Explained
• Hex digits, short for hexadecimal digits,
are base-16 numbers
• Uses decimal numbers, and then the first
six Latin letters
– 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
• There needed to be a better way to write
bit sequences…hexadecimal digits
http://www.asciitable.com/

10
Changing Hex to Binary
• The 32 bits below represent a
computer instruction
1000 1110 1101 1000 1010 0011 1010 0000
• Writing so many 0’s and 1’s is tedious
and error prone
• We can convert each four-bit group to
hex, giving the shorter version:
8ED8A3A0
11
Hexadecimal Digits

Each hex digit codes a four-bit group:


0000 0 0100 4 1000 8 1100 C
0001 1 0101 5 1001 9 1101 D
0010 2 0110 6 1010 A 1110 E
0011 3 0111 7 1011 B 1111 F

12
Digitizing Text
• We need to represent:
–26 uppercase,
–26 lowercase letters,
–10 numerals,
–20 punctuation characters,
–10 useful arithmetic characters,
– 3 other characters (new line, tab, and backspace)
–95 symbols…enough for English
13
Assigning Symbols
• ASCII stands for American Standard Code for
Information Interchange
• Advantages of a “standard”?

• IBM decided to use the next larger set of symbols, the


8-bit symbols (28) – started w/7-bit
• Eight bits produce 28 = 256 symbols
– Handles many languages that derived from the
Latin alphabet
• IBM gave 8-bit sequences a special name, byte
14
American Standard Code for Information
Interchange - ASCII

15
Data Encoding
• HELLO
• (human readable)
• 48-45-4C-4C-4F
• (ASCII encode - Hex)
• 0100 1000-0100 0101-0100 1100-0100 1100-0100 1111
• (machine language)

16
Unicode

• The 256 extended ASCII codes cover


most Western languages
• Unicode represents many more
characters by using up to 32 bits to code
characters
• UTF-8 records Unicode by writing long
characters as groups of bytes

17
Conversion
Chart
Binary to Hex
Hex to Binary
http://www.asciitable.com/
(A = 65)

18
Decimal vs. Binary
231 Base 10 128 64 32 16 8 4 2 1
2x100 3x10 1x1
2x102 3x101 1x100 1 1 1 0 01 11
1x27 1x26 1x25 0x24 0x23 1x22 1x21 1x20

128 + 64 + 32 + 0 + 0 + 4 + 2 + 1

11100111 base 2 = 231 base 10


19
Converting to Decimal
• Hex 48
• = (4 * 161) + (8 * 160)
• = 64 + 8
• = Decimal 72
• =Binary 1001000
= (1*26) (0*25) + (0*24) + (1*23) + (0*22) + (0*21) + (0*20)

= (1*64) + (0*32) (0*16) + (1*8) + (0*4) + (0*1) + (0*1)

= 64 + 0+ 0+ 8+ 0+ 0+ 0

= 72
20
Converting – From Decimal
• Decimal to Hexadecimal
• 72 divided by 16 = 4 with the remainder of 8
• 4 divided by 16 = 0 with the remainder of 4
• = 48
• Decimal to Binary
• 72 divided by 2 = 36 with the remainder of 0
• 36 divided by 2 = 18 with the remainder of 0
• 18 divided by 2 = 9 with the remainder of 0
• 9 divided by 2 = 4 with the remainder of 1
• 4 divided by 2 = 2 with the remainder of 0
• 2 divided by 2 = 1 with the remainder of 0
• 1 divided by 2 = 0 with the remainder of 1
• = 1001000
21
Let’s try some
Base 10 Base 2 Base 16
129

10110111

56

8C

C5

11001011
22
Metadata

•Metadata is data about data


• How is content structures?
• What units?
• When created?

23
Chapter 7 – Digital Information

Chapter 7 – Representing Information Digitally


• PandA representation
• Binary system
• Hex notation
• Binary numbers compared with Decimal numbers
• Conversions: Hexadecimal, Decimal, Binary
• Digitizing text: ASCII, Extended ASCII, Unicode
• Metadata

24

You might also like