Transcript File

Computer
Systems
Nat 4/5 Computing Science
Lesson 2:
More on Binary
1. What is an integer?
2. Convert 1100 1100 into a decimal
number
3. Convert 23 into binary.
4. What are the three advantages of
binary
1. A whole number
2. 1100 1100 = 204
3. 23 = 0001 0111
4. a) There are less rules of arithmetic.
b) 0’s and 1’s are easier to represent.
c) Any drop in voltage doesn’t effect
data.
Lesson Aims
 By






the end of this lesson you will be able to:
Describe what a real number is.
Describe what the mantissa is.
Describe what the exponent is.
Describe what Floating Point Representation is.
Represent real numbers using Floating Point
representation.
State the storage terms used in computing.
Nat 4/5
What is a real number?
 Real
numbers are ALL numbers both whole
and fractional
 Real
numbers can be 1¾ or 1.75 or 1750
 Real numbers can be very very small
0.00000001 or very very large
1,987,897,564,859
 Real numbers can be very accurate
1245.235687412
Nat 4/5
How are real numbers represented
in binary
 Real
numbers are represented in binary
using a system called floating point
representation
 It
is similar to floating point notation that is
used in decimal to represent very small very
large numbers
 For example 3*108 = 300.000.000
Nat 4/5
Floating point representation
 In
floating point notation, numbers can be
divided into the base/mantissa/exponent
 a*10b
 “a”
is the mantissa (the number)
 10 for the number system
 “b” the exponent (raises 10 to the power of)
 .183506*102 = 18.3506
Nat 4/5
Floating point representation
214 = .214 * 1000 = .214*103
exponent
mantissa
The point moves three places
base
Nat 4/5
Floating point representation
 The
mantissa is the actual digits of the
number
 The exponent is the power (to which the
base is raised)
 In binary the base is always 2
 As the base is always 2 it can be ignored
and all that has to be stored is,
 The mantissa (the number) and the
exponent (the power to which the base is
raised)
Nat 4/5
Floating point representation
 214
= 11010110 in binary
mantissa
 11010110
= .11010110 *
21000
base
The point moves eight places
exponent
Nat 4/5
Floating point representation
 We
can ignore the base and leave out the
multiplication sign and write it as:
exponent
 110101101000
mantissa
 It
exponent
can also be written as 10110110 1000
mantissa
Nat 4/5
Storage terms used in computing
A
single unit in binary is a bit
 A bit can be 1 or 0
 A binary number made up of eight bits is
called a byte for example,11101101
 One
Kilobyte is 1024 bytes, 1 Kb is one
Kilobyte or 1024 bytes or 210
210
23 22 21 20
Nat 4/5
Storage terms used in computing

1 Kb = 1024 bytes

One Megabyte (Mb) = 1024 Kilobytes (220 bytes)

One Gigabyte (Gb) = 1024 Megabytes (230 bytes)

One Terabyte (Tb) = 1024 Gigabytes (240 bytes)

Sometimes the abbreviations are expressed in
uppercase, KB, MB, GB and TB
Nat 4/5
Storage terms used in computing
Kilobyte
Megabyte
Nat 4/5
Gigabyte
Megabyte
Nat 4/5
Storage terms used in computing
Kilobyte
Megabyte
Gigabyte
Terabyte
Petabyte
Exabyte
Zettabyte
Yottabyte

A petabyte is the equivalent of 250 billion pages of text,
enough to fill 20 million four-drawer filing cabinets.