0% found this document useful (0 votes)
40 views32 pages

Chapter 1 Data Storage 2

Computers represent data using binary numbers consisting of only 0s and 1s. A bit is the basic unit of data, being either a 0 or 1. Eight bits form a byte, the common unit of digital storage. Larger units include kilobytes, megabytes, and gigabytes. Common ways to represent different data types in binary include binary coding, hexadecimal, two's complement for integers, and character encoding schemes like ASCII.

Uploaded by

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

Chapter 1 Data Storage 2

Computers represent data using binary numbers consisting of only 0s and 1s. A bit is the basic unit of data, being either a 0 or 1. Eight bits form a byte, the common unit of digital storage. Larger units include kilobytes, megabytes, and gigabytes. Common ways to represent different data types in binary include binary coding, hexadecimal, two's complement for integers, and character encoding schemes like ASCII.

Uploaded by

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

Chapter 1:

Data Storage

Computer Science: An Overview


Tenth Edition

by
J. Glenn Brookshear

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley


What’s on the Motherboard?

 The motherboard is the printed


circuit board that contains thousands
of electrical circuits, it provides the
centralized connection point for the
computer’s components.
 The majority of parts found on the
motherboard are integrated circuits.
 An integrated circuit (or chip) includes
millions of transistors and carries electrical
current.
 A transistor is a switch that is able to
control the electrical signal flow to the
circuit. 2
How Computers
Represent Data
 Computers only have two possible states by
which to represent data - high or low power
circuit.
 The base-2 system or binary numbers is a
perfect system for computers, it allows
computers to be built with current technology
 0 = low power circuit (off)
 1 = high power circuit (on)

3
Binary Number
(base 2)
Decimal Number
(base 10) How Computers
0
1
0
1
Represent Data
10 2
11 3
100 4 Computers work with
101 5
110 6
binary numbers,
111 7 which include only
1000 8 0s and 1s.
1001 9
1010 10
1011 11
1100 12
1101 13
1110 14
1111 15
How Computers
Represent Data
 Binary numbers : Computers work with binary
numbers, which include only 0s and 1s.
 Bit : is the smallest piece of data (or unit of
information) a computer can work with
OFF ON
OFF
ON
A bit is either “on”
OR = 1 bit
or “off,” a 0 or a 1.
0 1
 Eight bits, a Byte, signify a single unit of storage.
1 Byte = 8 bits = 1 Byte
0 1 0 0 0 0 0 1
5
How Computers
Represent Data
Bits

Bytes
8 bits = 1 Byte
one thousand Bytes = 1 Kilobyte (KB)
one million Bytes = 1 Megabyte (MB)
one billion Bytes = 1 Gigabyte (GB)
6
one trillion Bytes = 1 Terabyte (TB)
How Computers
Represent Data
 The common measurement of a data
transfer rate is in bits per second,
Example: gigabits per second (Gbps).
 The common measurement of data
storage is in bytes, such as gigabytes
(GB).

Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 7


Numbers with Different Bases
Binary Number Decimal Number
(base 2) (base 10)
0 0
1 1
10 2
11 3
100 4
101 5
110 6
111 7
1000 8
1001 9
1010 10
1011 11
1100 12
1101 13
1110 14
1111 15
The Bits

• The word bit is a shortening of the words


"Binary digIT." Whereas decimal digits
have 10 possible values ranging from 0 to
9, bits have only two possible values: 0
and 1. Therefore, a binary number is
composed of only 0s and 1s, like this: 1011

1-9

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley


Bits and Bit Patterns

• Bit: Binary Digit (0 or 1)


• Bit Patterns are used to represent information.
– Numbers
– Text characters
– Images
– Sound
– And others

1-10

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-10


Bytes
• It often designates a sequence of bits
(binary digits) whose length is eight bits.
• With 8 bits in a byte, you can represent
256 values ranging from 0 to 255, as
shown here:
• 0 = 00000000
1 = 00000001
...
254 = 11111110
255 = 11111111 1-11

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-11


Decimal Numbers

The easiest way to understand bits is to compare


them to something you know: digits. A digit is a
single place that can hold numerical values
between 0 and 9. Digits are normally combined
together in groups to create larger numbers. For
example, 357 has three digits. It is understood
that in the number, the 7 is filling the "1s place,"
while the 5 is filling the 10s place, the 3 is filling
the 100s. So you could express things this way if
you wanted to be explicit:
• (3 * 100) + (5 * 10) + (7 * 1) = 300 + 50 + 7 = 357 1-12
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
The Binary System

The traditional decimal system is based


on powers of ten.

The Binary system is based on powers


of two.

1-13

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-13


Figure 1.15 The base ten and binary
systems

1-14

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-14


Figure 1.17 An algorithm for finding the
binary representation of a positive integer

1-15

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-15


Figure 1.18 Applying the algorithm in
Figure 1.15 to obtain the binary
representation of thirteen

1-16

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-16


Figure 1.16 Decoding the binary
representation 100101

1-17

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-17


Binary Addition

1-18

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-18


Figure 1.19 The binary addition facts

11 (carry)
1010
1111+
11001

1-19

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-19


Hexadecimal Notation

• Hexadecimal notation: A shorthand


notation for long bit patterns
– Divides a pattern into groups of four bits each
– Represents each group by a single symbol
• Example: 10100011 becomes A3

1-20

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-20


Figure 1.6 The hexadecimal coding
system

1-21

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-21


Storing Integers

• Two’s complement notation: The most


popular means of representing integer
values
• Excess notation: Another means of
representing integer values
• Both can suffer from overflow errors.

1-22

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-22


Figure 1.21 Two’s complement
notation systems

1-23

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-23


Figure 1.22 Coding the value -6 in two’s
complement notation using four bits

1-24

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-24


Representing Text

• Each character (letter, punctuation, etc.) is


assigned a unique bit pattern.
– ASCII: Uses patterns of 7-bits to represent
most symbols used in written English text
– Unicode: Uses patterns of 16-bits to represent
the major symbols used in languages world
side
– ISO standard: Uses patterns of 32-bits to
represent most symbols used in languages
world wide

1-25

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-25


Figure 1.13 The message “Hello.” in
ASCII

1-26

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-26


How Computers Represent
Data - Character codes
• Binary numbers are useful for computers but are almost
unreadable by humans
• Character codes convert human readable characters
(letters, numbers, and symbols) into the binary
numbers(held in RAM) that the CPU can
understand( process).
• Three main types of character coding are:
1. American Standard Code for Information Interchange (ASCII);
(pronounced “ask-ee”).
2. Extended Binary Coded Decimal Interchange Code (EBCDIC)
3. Universal code(Unicode)
1-27
27
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Character codes

• ASCII: Acronym for the American Standard Code for


Information Interchange. Pronounced ask-ee, ASCII is a
code for representing English characters as numbers,
with each letter assigned a number from 0 to 127. For
example, the ASCII code for uppercase M is 77. Most
computers use ASCII codes to represent text, which
makes it possible to transfer data from one computer to
another. It uses 8 bits for each character encoding.

1-28
28
Copyright © 2011 Pearson
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Education, Inc. Publishing as
Prentice Hall
Character codes

• EBCDIC :Abbreviation of Extended Binary-Coded


Decimal Interchange Code. Pronounced eb-sih-dik,
EBCDIC is an IBM code for representing characters as
numbers. It is widely used on large IBM computers and
mainframes; most other computers, including PCs and
Macintoshes, use ASCII codes. It uses 8 bits for each
character encoding.

1-29
29
Copyright © 2011 Pearson
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Education, Inc. Publishing as
Prentice Hall
Character codes

• Unicode is a standard for the consistent encoding,


representation and handling of text expressed in most of
the world's writing systems. The latest version of Unicode
consists of a repertoire of more than 110,000 charaters.
It uses 8/16 bits for each character encoding.

1-30
30
Copyright © 2011 Pearson
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Education, Inc. Publishing as
Prentice Hall
ASCII and EBCDIC Code

1-31
31
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Example : Binary encoding using ASCII Code

DOG= 01000100 01001111 01000111

CAT= 01000011 01000001 01010100

1-32
32
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy