Beruflich Dokumente
Kultur Dokumente
AHMED THAKUR
DATA REPRESENTATION
1.1.1
Binary Systems
The binary number system plays a central role in how information of all kinds is stored on computers.
Understanding binary can lift a lot of the mystery from computers, because at a fundamental level
theyre really just machines for flipping binary digits on and off. There are several activities on binary
numbers in this document, all simple enough that they can be used to teach the binary system to
anyone who can count! Generally children learn the binary system very quickly using this approach,
but we find that many adults are also excited when they finally understand what bits and bytes really
are.
In mathematics and digital electronics, a binary number is a number expressed in the binary numeral
system, or base-2 numeral system, which represents numeric values using two different symbols:
typically 0 (zero) and 1 (one). The base-2 system is a positional notation with a radix of 2. Because of
its straightforward implementation in digital electronic circuitry using logic gates, the binary system is
used internally by almost all modern computers and computer-based devices. Each digit is referred
to as a bit.
Number System
A number system is a method of calculation and counting and working with digits and numbers.
Scientists and mathematicians use four numbers systems as follows:
NUMBER SYSTEM
BASE
NO. OF DIGITS
DIGITS
Binary
0, 1
Octal
0,1,2,3,4,5,6,7
Decimal
10
10
0,1,2,3,4,5,6,7,8,9
Hexadecimal
16
16
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
COMPUTER SCIENCE
2210
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 1
1.1
AHMED THAKUR
DATA REPRESENTATION
128
64
32
16
Binary counting may be represented (by adding each bits value) using binary scale as follows:
128
64
32
16
10
Decimal numbers
Binary numbers
COMPUTER SCIENCE
2210
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 2
1.1
DATA REPRESENTATION
AHMED THAKUR
bits
bytes
kilobytes
megabytes
gigabytes
terabytes
COMPUTER SCIENCE
2210
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 3
1.1
AHMED THAKUR
DATA REPRESENTATION
Equal to
Unit
8 bits
1 byte
1024 bytes
1 kilobyte
KB
1024 kilobytes
1 megabyte
MB
1024 megabytes
1 gigabyte
GB
1024 gigabytes
1 terabyte
TB
1024 terabytes
1 petabyte
PB
1024 petabytes
1 Exabyte
EB
1024 exabytes
1 Zettabyte
ZB
1024 zettabytes
1 Yottabyte
YB
The size of a file and a storage device's capacity will always be written in its simplest form. For
example, an operating system would report a 1 terabyte hard disk's size as 1TB not as 1024GB,
although both are correct.
Example file sizes
The table below lists files commonly found on a computer and their typical file size (compressed):
File
File size
Photo
3MB
Song
5MB
Film
700MB
A files size can be influenced by a number of factors but ultimately the more information a file stores,
the larger it will be.
In Data storage and when describing memory size, a Kilobyte is 210, or 1024 bytes.
Bytes are always some multiple or exponent of two.
COMPUTER SCIENCE
2210
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 4
1.1
DATA REPRESENTATION
AHMED THAKUR
Bit: Short for binary digit. The smallest unit of information handled by a computer. One bit expresses
a 1 or a 0 in a binary numeral, or a true or false logical condition, and is represented physically by an
element such as a high or low voltage at one point in a circuit or a small spot on a disk magnetized
one way or the other.
Byte: Short for binary term. A unit of data, today almost always consisting of 8 bits. A byte can
represent a single character, such as a letter, a digit, or a punctuation mark.
Conversion of positive denary integers into binary and positive binary integers into denary
26
13
6
3
1
0
1
0
1
COMPUTER SCIENCE
2210
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 5
1.1
AHMED THAKUR
DATA REPRESENTATION
128
64
32
16
= 42
Method 2:
(11010)2 ( ? )10
We may also use the binary scale to find out what this binary integer represent in denary
(decimal) number system.
128
64
32
16
= 26
Simply place the binary digits on their bit positions on the binary scale and add them.
Online Converter:
www.mathsisfun.com/binary-decimal-hexadecimal-converter.html
Understanding of the concept of a byte and how the byte is used to measure memory size
COMPUTER SCIENCE
2210
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 6
1.1
DATA REPRESENTATION
AHMED THAKUR
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
1101
1110
1111
10000
10001
10010
10011
10100
When you look at this sequence, 0 and 1 are the same for decimal and binary number systems. At
the number 2, you see carrying first take place in the binary system. If a bit is 1, and you add 1 to it,
the bit becomes 0 and the next bit becomes 1. In the transition from 15 to 16 this effect rolls over
through 4 bits, turning 1111 into 10000.
Bits are rarely seen alone in computers. They are almost always bundled together into 8-bit
collections, and these collections are called bytes. Why are there 8 bits in a byte? A similar question
COMPUTER SCIENCE
2210
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 7
1.1
DATA REPRESENTATION
AHMED THAKUR
is, "Why are there 12 eggs in a dozen?" The 8-bit byte is something that people settled on through
trial and error over the past 50 years.
With 8 bits in a byte, you can represent 256 values ranging from 0 to 255, as shown here:
0 = 00000000
1 = 00000001
2 = 00000010
...
254 = 11111110
255 = 11111111
Measuring Bytes in Devices
The hard disk
A hard disk stores:
the operating system
software applications or programs
the majority of your data files
Hard disks spin at very high speeds (around 7,200 RPM - revolutions per minute) within a sealed unit
inside the computer. Hard disks store large amounts of data - 200GB to 1TB is common in desktop
computers. The data stored on a hard disk is retained until deleted, but it needs to be loaded into
main store RAM before it can be used.
Floppy disk
Floppy discs became popular in the 1970s. The most common format was 1.44 MB, capable of
holding only very small amounts of data. Computers need a floppy drive to read floppy disks, and
many modern computers are no longer supplied with a floppy disc drive because we now work with
much larger files.
Now we are capable of storing 16 GB of data on a memory card which is, physically, six times smaller
then a floppy disk. It would take roughly 11,111 floppy disks to store 16 GB of data.
In the past, floppy disks were used to:
transfer small files of data from one machine to another
backup important small files stored on a hard disk
store restricted files that you didnt want other users of your computer seeing
Zip disk
Zip disks are like large floppy disks but can store 250MB or more of data. To read them a computer
needs a zip drive. Their use is similar to that of floppy disks.
Newer storage mediums such as DVD-RWs and memory sticks have replaced floppy/zip disks
External backing stores: optical discs
There are several different types of optical disc, although they all look pretty much the same.
CD (Compact Disc)
Optical discs that use the same technology as music CDs. They store up to 700MB of data. CDs can
be used for multimedia applications such as encyclopaedias and can store pictures, sounds and
video clips or anything else that will fit.
There are several formats on the market, such as:
CD-ROM - read only, the data is written to them before they are sold.
CD-R - meaning CD-Recordable, the user can write data to the CD once or fill it over time using
multi-session (writing to the same disc on separate occasions).
COMPUTER SCIENCE
2210
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 8
1.1
DATA REPRESENTATION
AHMED THAKUR
CD-RW - meaning CD-ReWritable, the CD can be written and re-written to. Unlike multi-session
discs, existing data can be overwritten.
Use of binary in computer registers for a given application (such as in robotics, digital
instruments and counting systems
COMPUTER SCIENCE
2210
Q15 Coffee
Q16 Encryption System
Q12 LCD Display
Q13 Touch Screen
https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885
Page 9