Sie sind auf Seite 1von 9

1.

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

Binary Number System


In an 8-bit binary number system the counting is done using the following binary scale:
8

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 and Binary


Computers use binary - the digits 0 and 1 - to store data. A binary digit, or bit, is the smallest unit of
data in computing. It is represented by a 0 or a 1. Binary numbers are made up of binary digits (bits),
eg the binary number 1001.
The circuits in a computer's processor are made up of billions of transistors. A transistor is a tiny switch
that is activated by the electronic signals it receives. The digits 1 and 0 used in binary reflect the on
and off states of a transistor.
Computer programs are sets of instructions. Each instruction is translated into machine code - simple
binary codes that activate the CPU. Programmers write computer code and this is converted by a
translator into binary instructions that the processor can execute.
All software, music, documents, and any other information that is processed by a computer, is also
stored using binary.

Recognition of the use of binary numbers in computer systems

Storage capacity and file size


Storage capacities and file sizes are measured from lowest to highest in:

bits
bytes
kilobytes
megabytes
gigabytes
terabytes

An operating system abbreviates these measurements, eg 1 megabyte becomes 1MB (megabyte).


Relationship between measurements
The table below outlines the relationship between bits (smallest) and terabytes (largest). Read each
row of the table from left to right:

COMPUTER SCIENCE
2210

https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885

Page 3

1.1

AHMED THAKUR

DATA REPRESENTATION

Relationship between measurements


Size

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

Denary (Decimal) Integers into binary


Method 1:
(26)10 ( ? )2
Since the denary number (base 10) needs to be converted into the binary number (base 2),
therefore the number has to be divided by 2.
2
2
2
2
2

26
13
6
3
1

0
1
0
1

26 divided by 2 is 13, and remainder is 0


13 divided by 2 is 6, and remainder is 0
Collect all the remainders from bottom to top.
Hence: 1 1 0 1 0

= (11010)2 is the binary integer of (26)10 Denary integer


Method 2:
(42)10 ( ? ) 2
Use the binary scale and mark a 1 (on) to the bits positions that add up to make 42.
i.e. 32 + 8 + 2 = 42

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

= (101010)2 is the binary integer of (42)10 Denary integer


Binary Integer into Denary
Method 1:
(101)2 ( ? )10
Since Binary number needs to be converted to denary therefore each digit of binary number
will be multiplied with 2 representing its power in base 10, and their products will be added
together. E.g.
= (1 x 22) + (0 x 21) + (1 x 20)
= (1 x 4) + (0 x 2) + (1 x 1)
=4+0+1
= 5 or (5)10

Since anything to the power zero is 1


(5)10 is the Denary integer of (101)2 binary integer.

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

How Bits and Bytes Work


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, 6,357 has four digits. It is understood that
in the number 6,357, the 7 is filling the "1s place," while the 5 is filling the 10s place, the 3 is filling the
100s place and the 6 is filling the 1,000s place. So you could express things this way if you wanted to
be explicit:
(6 * 1000) + (3 * 100) + (5 * 10) + (7 * 1)
= 6000 + 300 + 50 + 7 = 6357
Another way to express it would be to use powers of 10

COMPUTER SCIENCE
2210

https://www.facebook.com/groups/OAComputers/
ahmed_thakur@hotmail.com, 0300-8268885

Page 6

1.1

DATA REPRESENTATION

AHMED THAKUR

(6 * 103) + (3 * 102) + (5 * 101) + (7 * 100)


= 6000 + 300 + 50 + 7 = 6357
What you can see from this expression is that each digit is a placeholder for the next higher power
of 10, starting in the first digit with 10 raised to the power of zero.

The Base-2 System and the 8-bit Byte


The reason computers use the base-2 system is because it makes it a lot easier to implement them
with current electronic technology. You could wire up and build computers that operate in base-10,
but they would be fiendishly expensive right now. On the other hand, base-2 computers are relatively
cheap.
So computers use binary numbers, and therefore use binary digits in place of decimal digits. 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. How do you figure out what the value of the binary
number 1011 is? You do it in the same way we did it above for 6357, but you use a base of 2 instead
of a base of 10. So:
(1 * 23) + (0 * 22) + (1 * 21) + (1 * 20) = 8 + 0 + 2 + 1 = 11
You can see that in binary numbers, each bit holds the value of increasing powers of 2. That makes
counting in binary pretty easy. Starting at zero and going through 20, counting in decimal and binary
looks like this:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

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.

DVD (Digital Versatile Disc)


DVDs are the same physical size as CDs but hold much more data - a single sided disc can hold up
to 4.7GB. DVDs are commonly used for storing video so you will often see them measured in minutes,
eg 4.7GB = 120 minutes.
There are several formats on the market, such as:
DVD-ROMs - read only, the data is written to them before they are sold.
DVD-R - meaning DVD-Recordable, the user can write data to the DVD once or fill it over time
using multi-session.
DVD-RW - meaning DVD-ReWritable, the DVD can be written and re-written to. Unlike multisession 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

June 2012, Paper 11,


June 2014, Paper 12,
June 2014, Paper 11,
November 2013, Paper 13,

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

Das könnte Ihnen auch gefallen