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

Binary and Data Representation

Uploaded by

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

Binary and Data Representation

Uploaded by

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

ICT IGCSE Theory – Revision Presentation

Data representation

• Recognize the use of binary numbers in computer systems


• Convert positive denary integers into binary and positive binary integers into denary.
• Show understanding of the concept of a byte and how the byte is used to measure
Chapter 1: Data representation

memory size
• Use binary in computer registers for a given application (such as in robotics, digital
instruments and counting systems)
• Represent integers as hexadecimal numbers
• convert positive hexadecimal integers to and from denary
• convert positive hexadecimal integers to and from binary
• Show understanding of the reasons for choosing hexadecimal to represent numbers
• Represent numbers stored in registers and main memory as hexadecimal
• Identify current uses of hexadecimal numbers in computing
ICT IGCSE Theory – Revision Presentation
Data representation

Recognize the use of binary numbers in computer systems


Chapter 1: Data representation

In binary we have only two digits 0 and 1 so we call this base-2. Computers as we
know them today are electronic machines which at their most basic level are simply a
collection of billions and billions of switches which can be either on (represented by
the digit 1) and off (represented by the digit 0).

For Humans to be able to work with computers we need ways of


representing all of the data we use in binary. Everything you see on your
computer screen can be converted in to binary so that it can be processed
by the computer.
ICT IGCSE Theory – Revision Presentation
Data representation

Convert positive denary integers into binary and positive binary integers into denary.

Binary to Denary
Chapter 1: Data representation

a. Write out the binary number.


b. Write the denary number 1 above the least significant bit (the last digit
on the right).
c. Write the number 2 above the next most significant bit, then 4 and so
on.
d. Add together the denary values of all digits given as a 1. Ignore any 0s.
In this example we would add 32 + 8 to find the answer 40.
ICT IGCSE Theory – Revision Presentation
Data representation

Example
Chapter 1: Data representation

Convert the binary number 100101 in to denary.

• First we write out the number and assign a denary value to each bit, like this:

32 16 8 4 2 1
1 0 0 1 0 1

• Finally we add together all of the values where we have a binary 1, so:

32
4
+ 1
---
37
---

Which gets us the answer of 37.


ICT IGCSE Theory – Revision Presentation
Data representation

Denary to Binary
Chapter 1: Data representation

a. On the right of the page write the denary numeral 1


b. To its left right the numeral 2, then 4 and so on doubling each time until
you reach a number higher than the one you are trying to convert
c. Write a 0 under the most significant bit (the number on the far left). It is
too large so we won't use it.
d. Move one place to the right, if that number is smaller than the number
you're trying to convert then place a 1 under it.
e. Whenever you place a 1 under a number subtract that value from your
running total
f. Continue with step 2 and 3 until you reach the final digit.
ICT IGCSE Theory – Revision Presentation
Data representation

Example
Convert the denary number 73 in to binary.
• First I write out the denary place values from right to left:
128 64 32 16 8 4 2 1
Chapter 1: Data representation

• I don't need to use the 128 as it is too high, so I write a 0 under it:
128 64 32 16 8 4 2 1
0

• I can use the 64, which leaves me with 9 left to make:


128 64 32 16 8 4 2 1
0 1

• With only 9 left I don't need the 32 or the 16, but I do need the 8:
128 64 32 16 8 4 2 1
0 1 0 0 1

• This leaves me with only 1 left, so I don't need the 4 or the 2:


128 64 32 16 8 4 2 1
0 1 0 0 1 0 0 1

I can see from this that my final answer is 1001001.


ICT IGCSE Theory – Revision Presentation
Data representation

Show understanding of the concept of a byte and how the byte is used to measure
memory size

The smallest unit of data storage possible is a bit (b). The following table shows larger
Chapter 1: Data representation

units of measuring data:

Unit Size Short form


1 bit A single 1 or 0 b
1 nibble 4 bits
1 byte 2 nibbles B
1 kilobyte 1,024 bytes KB
1 megabyte 1,024 kilobytes MB
1 gigabyte 1,024 megabytes GB
1 terabyte 1,024 gigabytes TB
ICT IGCSE Theory – Revision Presentation
Data representation

Use binary in computer registers for a given application (such as in robotics, digital
instruments and counting systems)

A register is a group of bits, often represented in a grid. The following grid shows an
Chapter 1: Data representation

8-bit register.
1 1 0 1 1 0 1 1
Computers (or microprocessors) are used to control devices, such as robots, industrial
or household environments. Registers are used as part of the control system. Each bit
in the register will control a different part of the system. For example, suppose a
microprocessor controls a household security system. The register could be setup as
follows:
1 0 1 0 1 0 1 1
Kitchen Kitchen Send
Kitchen Kitchen Sound Silence Autocall
camera camera notificati
light on light off alarm alarm Police
on off on

In this state, the kitchen light would be triggered ON, the camera would be triggered
ON, the alarm would be triggered ON, the notification would be sent, and the police
would be autocalled. When another register is send to the control system, the state of
each part can be changed by adjusting the bits in the register.
ICT IGCSE Theory – Revision Presentation
Data representation

Represent integers as hexadecimal numbers

In hexadecimal we have 16 numerals, shown together with binary and denary


in the table below:
Chapter 1: Data representation

Binary Denary Hexadecimal


base-2 base-10 base-16
0 0 0
1 1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
A
B
C
D
E
F
ICT IGCSE Theory – Revision Presentation
Data representation

Convert positive hexadecimal integers to and from denary


Convert positive hexadecimal integers to and from binary

To Hexadecimal
Chapter 1: Data representation

1.Convert the number into binary.


2.Split the binary number into groups of 4 bits.
3.Convert each group of 4 bits back to denary.
4.Convert each denary number into a single hexadecimal
numeral.

From Hexadecimal
1.Convert each hexadecimal numeral into its denary value.
2.Convert each denary number into 4-bit binary.
3.Join the 4-bit numbers together to create a single binary number.
4.Convert this binary number to denary.
ICT IGCSE Theory – Revision Presentation
Data representation

Show understanding of the reasons for choosing hexadecimal to represent numbers


Represent numbers stored in registers and main memory as hexadecimal
Identify current uses of hexadecimal numbers in computing
Chapter 1: Data representation

Hexadecimal is used as an intermediate step between binary and denary


because it is easier for a computer to convert between binary and hexadecimal
than between binary and denary whilst at the same time being easier for a
Human to process than a binary number would be.

It is also used because a single hexadecmical numeral can


store 1 nibble and we can store a whole byte using only 2
hexadecimal numerals.

Depending on the application this can have benefits in both


storage space and processing time.
ICT IGCSE Theory – Revision Presentation
Data representation

HTML Colour Codes

One example of how hexadecimal is used in computers would be HTML


Chapter 1: Data representation

colour codes. In HTML colours are defined by how much red, green and blue
there is on a scale of 0 to 255. The range 0 to 255 was chosen because that
is the range of numbers that can be fitted into a single byte and a single byte
can be represented as two hexadecimal numerals.

HTML colour codes start with a hash symbol followed by 3 pairs of


hexadecimal numbers. The first two numerals show how much red, the
second pair show how much green and the final pair show how much blue.
For example the HTML colour code #00FF00 would have 00 (0) units of
red, FF (255) units of green and 00 (0) units of blue. The diagram below
shows several examples of HTML colour codes. More can be found on the
website html-color-codes.info.

#0000FF #00FF00 #FF0000 #FF00FF #FFFF00 #000000 #FFFFFF


ICT IGCSE Theory – Revision Presentation
Data representation

MAC Addresses

All network adapters and network devices have a Media Access Control (MAC)
Chapter 1: Data representation

address. This is also known as the 'physical address' and is a unique address
determined during the manufacture of each device. This address is given as a
set of 6 pairs of hexadecimal numbers.

An example of a MAC address would be: A0-1D-48-FE-5E-F5.You can


determine the physical address of the network adapters in a computer
running the Windows operating system by typing the following command
in to a command prompt:

ipconfig /all

You might also like