Sie sind auf Seite 1von 35

CMPF134

Chapter 4 – Data Unit


1
Chapter Objectives
◦ To be exposed to basic data units in computer
◦ To be exposed to the hierarchy forms of data unit: bit,
nibble, byte, word, KB, MB, TB, PB
◦ To be exposed to the concept of speed measurement in
computer: data transfer rate, clock speed, clock cycle

2
Introduction
◦ Digital electronics involves circuits and systems in which there are
only two possible states.
◦ These states are represented by two different voltage levels: HIGH
(1) and LOW (0)
◦ In digital systems such as computers, combinations of these two
states (called codes) are used to represent numbers, symbols,
alphabetic characters and other types of information
◦ The two-state number system is called binary, and its two digits
are 0 and 1
3
Bit
◦ Each of the digits in the binary system (1 and 0), is called a
bit (b)
◦ A contraction of the words Binary Digit
◦ The smallest increment of data on a computer
◦ The basic unit of information in a computer
◦ A bit can hold only one of two values : 0 or 1

4
Bit (Cont.)
◦ In digital circuits, 1 is represented by higher voltage (HIGH) and
a 0 is represented by the lower voltage level (LOW)
HIGH = 1 (ON)
LOW = 0 (OFF)

5
Byte
◦ We seldom work with one bit of information at a time
◦ Bits are usually assembled into a group of eight, to form a Byte (B)
◦ A Byte is used to store single ASCII character, such as:
• “A” = 0100 0001
• “a” = 0110 0001
• “@” = 0100 0000

◦ It is also the basis for counting storage capacity (Example: 1TB hard
drive, 32GB USB drive)

6
Nibble
◦ A group of four bits (b)
◦ Two nibbles make a byte (B)
◦ This term is not commonly used as compared to bit and byte
(because most microprocessors use groups of 8 bits and higher to
process data)
◦ It is important in BCD and hexadecimal digits’ representations
◦ In data communications, nibbles are sometimes called "quad bits”,
because of the four bits that make up each nibble
7
Word
◦ The number of bits (a group of Bytes) that a CPU can process at one time
◦ The number of bits in a word (also called word width, word size, or
word length) is an important characteristic of specific processor design
or computer architecture, which is often described as n-bit architecture
where n is usually equal to 8, 16, 32 or 64

8
Word (cont.)
◦ The size of a word varies from one computer to another, depending on
the CPU.
◦ For computers with a 16-bit CPU, a word is 16 bits (2 bytes). Whereas on
large mainframes, a word can be as long as 64 bits (8 bytes)
◦ A word can contain a computer instruction, a storage address, or
application data that is to be manipulated. The longer the architected
word length, the more the computer processor can do in a single
operation

9
Data Transfer
◦ Data refers to groups of bits (Bytes) that convey different types
of information
◦ Binary data must be transferred from one device to another
device in order to accomplish a given purpose
• Example:
• Two sets of binary numbers stored in the memory of a computer must be
transferred to the computer’s CPU to be added in order to obtain the sum
• The sum obtained will then be transferred to a monitor to display / to be sent
back to memory
10
Data Transfer (Cont.)
◦ In general, binary data are transferred in two ways: Serial form
and Parallel form
◦ When bits are transferred in serial form from one point to
another, they are sent one bit at a time (sequentially) along a
single line

11
Data Transfer (Cont.)
◦ When bits are transferred in parallel form, all the bits in a group
are sent out on separate lines at the same time (each bit is given
one specific line)

12
Data Transfer (Cont.)
◦ A serial data transfer requires only one data transmission line,
however it takes longer time to transfer a given number of bits
(Example: if one bit can be transferred in 1 µs, then 8 bits would
require 8 µs to be transferred)
◦ A parallel data transfer allows a group of bits to be transmitted
within a shorter time frame (Example: only 1 µs is required to
transfer 8 bits). However, it takes more lines than serial transfer

13
Data Transfer Rate
◦ Can be described as the amount of digital data that is transferable from one
device to another device within a given time
◦ Data transfer rate is usually measured in bits per second (bps)
◦ Example:
 A typical low-speed connection to the Internet may be 33.6 kilobits per second (Kbps)
 On Ethernet local area networks, data transfer can be as fast as 10 megabits per second
(Mbps)
 The highest data transfer rate to date is 14 terabits per second (Tbps) over a single
optical fiber, reported by Japan's Nippon Telegraph and Telephone (NTT DoComo) in
2006
14
Data Transfer Rate (Cont.)
◦ The term bandwidth is used as a synonym for data transfer rate in
computer networks. It is a measurement for amount of information
that can be transferred across a communication channel
◦ The greater the bandwidth of a given transmission path, the higher
data transfer rate
◦ Example:
Modern networks typically have speeds measured in the millions of bits per
second (megabits per second, Mbps) or billions of bits per second (gigabits
per second, Gbps)
15
Exercise 1
A modem is capable to transfer a file with size of 25 Mega Bytes (MB) in
2 minutes. Calculate the data transfer rate of this modem.

Solution:
Data transfer rate is measured in the unit of bits per second:
1. Change file size from Bytes to bits : 25 Mega Bytes = 25 * 8 Megabits = 200 Megabits
2. Change transfer time from minutes to seconds: 2 minutes = 2 * 60 = 120 seconds
3. Data transfer rate = file size / transfer time
= 200 Megabits / 120 seconds
= 1.67 Megabits per second (Mbps)
16
Exercise 2
How long will it take to transfer a 1.2MB file using a modem which is capable
to work at 52 Megabits per second (Mbps)?

Solution:
We know that Data transfer rate = file size (bits) / transfer time (seconds),
therefore transfer time = file size / data transfer rate
1. Change file size from Bytes to bits : 1.2 Mega Bytes = 1.2 * 8 Megabits = 9.6 Megabits
2. Given data transfer rate = 52 Mbps
transfer time = file size / data transfer rate
= 9.6 Megabits / 52 Mbps
= 0.18 seconds
17
Exercise 3
A 3 Gbps modem has transferred a file completely in 15 minutes and 10
seconds. Identify the size of the file (in the unit of Byte, B).

Solution:
1. Change transfer time to seconds: Transfer time = 15 minutes, 10 seconds
= (15 * 60) + 10 = 910 seconds

2. Given Data transfer rate = file size / transfer time, therefore

file size = Data transfer rate * Transfer time


= 3 Gbps * 910 seconds
= 2730 Gb = 2730 Gb / 8 = 341.25 GB
18
System Clock
◦ The processor relies on a small quartz crystal circuit called the system
clock to control the timing of all computer operations
◦ It generates regular electrical pulses (ticks) that set the operating pace
of components in system unit (imagine that your heart beats at a
regular pulse rate to keep your body functioning)
◦ Each pulse (tick) is equivalent to a clock cycle
◦ In the past, processors needed more than one clock cycle to execute
one instruction. Processors today can execute many instructions per
clock cycle, hence they are superscalar (latter type of processor gets
more work done at a given clock speed)
19
Clock Cycle
◦ A clock cycle, or simply a "cycle" is a single electronic pulse of a
CPU
◦ During each cycle, a CPU can perform a basic operation such as
fetching an instruction, accessing memory, or writing data
◦ Since only simple commands can be performed during each
cycle, most CPU processes require multiple clock cycles

20
Clock Speed
◦ Also known as clock rate
◦ The number of electronic pulses per second is known as the
clock speed, which is generally measured in Mhz (megahertz, or
millions of pulses per second) and lately even in Ghz (gigahertz,
or billions of pulses per second)
◦ This means a 1.8 GHz processor has twice the clock speed of a
900 MHz processor
◦ However, a 1.8 GHz CPU is not necessarily twice as fast as a 900
MHz CPU. This is because different processors have different
architectures
21
Clock Speed (Cont.)
◦ For example, if the 1.8 GHz CPU can complete a multiplication
instruction in 4 cycles, while the 900 MHz CPU takes 7 cycles, the
1.8 GHz processor will be more than twice as fast as the 900 MHz
processor. Conversely, if the 1.8 GHz processor takes more cycles to
perform the instruction, it will be less than 2x as fast as the 900
MHz processor
◦ Other factors such as a computer's bus speed, cache size, speed of
the RAM, and hard drive speed also contribute to the overall
performance of the machine

22
Prefixes
◦ When we deal with computer, numbers involved are often very large
or small
◦ Therefore, standard scientific prefixes are used to represent the
powers of 10
◦ Example:
◦ 1 kilo Byte is 1000 (multiplier of 103) Bytes in the international SI
◦ 1 mega Byte is 1000 000 (multiplier of 106) Bytes in the international SI

23
Prefixes (Cont.)
◦ While dealing with digital data storage, the multipliers are defined in
powers of 2 from 210 to 280, proceeding in increments of ten orders of
magnitude (210, 220, 230,….., 280)

Example 1 - kilo:
◦ 1 kilo Bytes (KB) is actually 1024 Bytes but not 1000 Bytes
◦ 1024 Bytes is obtained from 210
◦ Since 1024 Bytes is close to 1000 Bytes, hence it is also known as 1 kilo
Byte
24
Prefixes (Cont.)

Example 2 - mega:
◦ 1 mega Byte (MB) is actually 1048576 Bytes but not 1000 000 Bytes
◦ 1048576 Bytes is obtained from 220
◦ Since 1048576 Bytes is close to 1000 000 bits, hence it is also known as
1 mega Byte

25
Prefixes (Cont.)
Example 3 - Giga:
◦ 1 giga Byte (GB) is actually 1 073 741 824 Bytes but not 1 000 000 000
Bytes
◦ 1 073 741 824 Bytes is obtained from 230
◦ Since 1 073 741 824 Bytes is close to 1000 000 000 Bytes, hence it is also
known as 1 giga Byte

26
Prefixes (Cont.)
Example 4 – Tera:
◦ 1 tera Byte (Tb) is actually 1 099 511 627 776 Bytes but not 1 000 000
000 000 Bytes
◦ 1 099 511 627 776 Bytes is obtained from 240
◦ Since 1 099 511 627 776 Bytes is close to 1000 000 000 000 (1012)
Bytes, hence it is also known as 1 tera Byte

27
List of Prefixes
Prefix Symbol(s) Power of 10 Power of 2
pico- p 10-12 * --
nano- n 10-9 * --
micro- µ 10-6 * --
milli- m 10-3 * --
centi- c 10-2 * --
deci- d 10-1 * --

28
List of Prefixes (Cont.)
Prefix Symbol(s) Power of 10 Power of 2
deka- D 101 * --
hecto- h 102 * --
kilo- k or K ** 103 210
mega- M 106 220
giga- G 109 230
tera- T 1012 240
peta- P 1015 250
exa- E 1018 * 260
zetta- Z 1021 * 270
yotta- Y 1024 * 280
* Not generally used to express data speed
** k = 103 and K = 210
29
Prefix: Summary
◦ Power-of-10 prefix multipliers (10x) are used in the measurement of
frequency (CPU’s clock speed)
◦ Example:
• 1.8 GHz processor is equal to 1.8 x 109 Hertz
◦ Power-of-10 multipliers are also used to define binary data speeds
(example: data transfer date)
◦ Example:
• 1 kbps (one kilobit per second) is equal to 103 or 1,000 bps (bits per
second)
• 1 Mbps (one megabit per second) is equal to 106 or 1,000,000 bps
(lowercase k is the technically correct symbol for kilo- when it
represents 103)
30
Prefix: Summary (Cont.)
◦ When binary data is stored in memory or secondary storage media
such as a hard drive, diskette, ZIP disk, tape, or CD-ROM, power-of-2
multipliers (2x) are used to measure storage capacity
◦ Example:
◦ 1 KB (one kilobyte) is 210 or 1,024 bytes (uppercase K should be used for
kilo- when it represents 210)
◦ 1 MB (one megabyte) is 220 or 1,048,576 bytes

31
Exercise 4
Luqman wants to submit CMPF134 report to his lecturer via WIFI
internet connection, with the bandwidth of 1000 Mbps. How long does it
take Luqman to send his report, if the file size is 100 MB?

32
Exercise 5
Lilo uses a 3 Mbps modem to submit her assignment file in 28 seconds.
Assuming that 1 single page of assignment report is 6 KB, how many
pages of assignment report has been submitted by Lilo?

33
Exercise 6
Superman is currently using his 50 MHz processor to generate CMPF134
assignment report. Given every single instruction in his CPU can be
executed in 5 clock cycles, how many instructions can be executed by
Superman’s CPU in one second?

34
Exercise 7
Identify the value of Y by performing conversion towards each pair of
prefixes given below:
1. 75 µHz = Y kHz
2. 80 Mbps = Y mbps
3. 100 GHz = Y µHz
4. 25 kbps = Y nbps
5. 30 Mbps = Y kbps
6. 50 dHz = Y nHz
35

Das könnte Ihnen auch gefallen