AS/A Level (for 2024 Exam)
The image you sent is a lesson plan on data representation. It is divided into two sections:
Understanding binary numbers
Converting integer values from one number base/representation to another
The first section explains the difference between binary numbers and decimal numbers, and how to convert between the two bases. The second section explains how to convert an integer value from any number base to any other number base.
Students will be able to:
Perform binary addition and subtraction using positive and negative binary integers.
Show understanding of how overflow can occur.
Describe practical applications where Binary Coded Decimal (BCD) and Hexadecimal are used.
Show understanding of and be able to represent character data in its internal binary form, depending on the character set used.
Additional notes:
Students are expected to be familiar with ASCII (American Standard Code for Information Interchange), extended ASCII, and Unicode.
Students will not be expected to memorize any particular character codes.
Image enhancements:
The image could be enhanced by adding visual representations of binary numbers, such as charts or diagrams.
Including examples of practical applications where BCD and hexadecimal are used would be helpful.
An image showing a table of ASCII or Unicode characters and their corresponding binary representations would also be beneficial.
11. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > Numbers and Quantities
12. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude
Since binary number can have only two symbols either 0 or 1 for each
position or bit, so it is not possible to add minus or plus symbols in
front of a binary number.
• Sign-Magnitude method
• 1’s Complement method
• 2’s complement method
• The representation of signed binary number is commonly referred
to as sign magnitude.
3 Ways to Represent Magnitude
13. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > signed magnitude
14. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > signed magnitude
15. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > signed magnitude
16. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > signed magnitude
17. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > signed magnitude
18. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > 1’s Complement
19. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > 2’s Complement
20. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > 2’s Complement
21. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > 2’s Complement
22. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude > 2’s Complement
23. Chapter 1: Information Representation > 1.1 Data Representation > Binary Magnitude
1. Using 2’s complement method, show the process to convert (0101
1011)2 into its negative equivalent.
Present your workings in the class.
24. Chapter 1: Information Representation > 1.1 Data Representation > Decimal Prefixes
Key Terms: Decimal prefixes are prefixes to define the magnitude of a
value. Examples are kilo, mega, giga, and tera.
(Based on SI Units)
Prefix Name of Memory Size Equivalent Denary Value
kilo 1 kilobyte (1 KB) 1 000
mega 1 megabyte (1 MB) 1 000 000
giga 1 gigabyte (1 GB) 1 000 000 000
tera 1 terabyte (1 TB) 1 000 000 000 000
peta 1 petabyte (1 PB) 1 000 000 000 000 000
25. Chapter 1: Information Representation > 1.1 Data Representation > Binary Prefixes
Key Terms: Binary prefixes are prefixes to define the magnitude
of a value. Examples are kibi, mebi, gibi, and tebi.
Prefix Name of Memory Size Number of bytes Equivalent denary value (bytes)
kibi 1 kibibyte (1 KiB) 210 1 024
mebi 1 mebibyte (1 MiB) 220 1 048 576
gibi 1 gibibyte (1 GiB) 230 1 073 741 824
tebi 1 tebibyte (1 TiB) 240 1 099 511 627 776
pebi 1 pebibyte (1 PiB) 250 1 125 899 906 842 624
Since memory sizes are measured in terms of powers of 2, the base 10 numbering system is technically
inaccurate, hence another system has been introduced.
(Based on IEE Units)
26. Chapter 1: Information Representation > 1.1 Data Representation > Binary Prefixes
How much a 4 MiB of RAM could store bytes of data?
It could store 4 x 220 bytes of data.
27. Chapter 1: Information Representation > 1.1 Data Representation > Binary Coded Decimal
Key Terms: Binary Coded Decimal (BCD) system uses 4-bit code to
represent each denary digit.
0000 = 0 0101 = 5
0001 = 1 0110 = 6
0010 = 2 0111 = 7
0011 = 3 1000 = 8
0100 = 4 1001 = 9
So,
28. Chapter 1: Information Representation > 1.1 Data Representation > Binary Coded Decimal
Can we consider as a BCD?
1010 = 10
1011 = 11
1100 = 12
1101 = 13
1110 = 14
1111 = 15
No, these are considered forbidden numbers and can not
be used in BCD system. Why though?
29. Chapter 1: Information Representation > 1.1 Data Representation > Binary Coded Decimal
Therefore,
the denary number 3 1 6 5 would be 0011 0001 0110 0101
in BCD format.
30. Chapter 1: Information Representation > 1.1 Data Representation > Binary Coded Decimal
What are the 2 ways to represent BCD in computers?
Check your coursebook (Cambridge Press) at page 13.
31. Chapter 1: Information Representation > 1.1 Data Representation > Binary Coded Decimal
1. Convert these denary numbers into BCD format.
a. 271 b. 5006 c. 7990
2. Convert these BCD numbers into denary numbers.
a. 1001 0011 0111
b. 0111 0111 0110 0010
c. 0010 1111 1010
39. Chapter 1: Information Representation > 1.1 Data Representation > Adding Binary Numbers
1. Carry out these binary additions and show if the answer matches
its denary equivalent.
a. 00111001 + 00101001
b. 01001011 + 00100011
c. 01011000 + 00101000
40. Chapter 1: Information Representation > 1.1 Data Representation > BCD Addition
Extension Activity:
Look into how to add BCD and give examples.
41. Chapter 1: Information Representation > 1.1 Data Representation > Uses of BCD
Advantages Limitations Uses
Easy conversion between machine-
readable and human-readable
numerals.
Requires extra bits of storage in
computer’s memory.
Used in digital displays such as in
calculators and digital clocks.
To get around the size limitations
imposed on integer arithmetic.
Performing arithmetic can be
cumbersome since no digit can
exceed 9.
Used in currency applications
where floating point representation
are inaccurate.
42. Chapter 1: Information Representation > 1.1 Data Representation > Uses of BCD
Uses
Used in digital displays such as
in calculators and digital clocks.
Used in currency applications
where floating point
representation are inaccurate.
Homework 1: Uses of BCD
• Explain how BCD is used in
digital displays and currency
applications?
43. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
44. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
45. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
46. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
47. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
48. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
49. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
50. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
51. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
52. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
53. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
54. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
55. Chapter 1: Information Representation > 1.1 Data Representation > Uses of Hexadecimal Number System
56. Chapter 1: Information Representation > 1.1 Data Representation > Binary Subtraction
How to subtract
binary numbers?
58. Chapter 1: Information Representation > 1.1 Data Representation > Subtracting Binary Numbers
59. Chapter 1: Information Representation > 1.1 Data Representation > Subtracting Binary Numbers
60. Chapter 1: Information Representation > 1.1 Data Representation > Subtracting Binary Numbers > 2’s Complement
Binary Subtraction Using 2's Complement
Step 1: Find the 1's complement of the subtrahend, which means the second number
of subtraction.
Step 2: Add it with the minuend or the first number.
Step 3: If there is a carryover left then add it with the result obtained from step 2.
Step 4: If there are no carryovers, then the result obtained in step 2 is the difference
of the two numbers using 1's complement binary subtraction.
61. Chapter 1: Information Representation > 1.1 Data Representation > Subtracting Binary Numbers
Let us understand this with an example.
Subtract 1100102 - 1001012 using 1's complement.
Here the binary equivalent of 50 is 1100102 and the binary equivalent of 37 is 1001012.
62. Chapter 1: Information Representation > 1.1 Data Representation > Subtracting Binary Numbers
Let us understand this with an example.
Subtract 1100102 - 1001012 using 1's complement.
Here the binary equivalent of 50 is 1101012 and the binary equivalent of 37 is 1001012.
63. Chapter 1: Information Representation > 1.1 Data Representation > Subtracting Binary Numbers
With a partner, perform the following binary operation using the binary
numbers given below:
1. Borrowing Method:
2. 2’s Complement method:
1 0 0 0 0 1 1 1
0 1 1 1 0 1 0
-
__________________
78. File Header
Bitmap image also contains
the File Header which has the
metadata contents of the
bitmap file, including image size,
number of colors, etc.
79. Image Resolution
Number of pixels that make up an
image, for example, an image could
contain 4096 x 3192 pixels (12,738,656
pixels in total).
80. Screen Resolution
• Number of horizontal and vertical pixels that
make up a screen display.
• If screen resolution is smaller than image
resolution, the whole image can not be shown
on the screen.
81. Color Depth
Number of bits used to represent
the colors in a pixel. 8 bit color
depth can represent 28 = 256 colors.
82. Bit Depth
• Number of bits used to represent the
smallest unit in sound or image file.
• The larger the bit depth, the better
the quality.
83. Chapter 1: Information Representation > Recap > Decimal Prefixes
Key Terms: Decimal prefixes are prefixes to define the magnitude of a
value. Examples are kilo, mega, giga, and tera.
(Based on SI Units)
Prefix Name of Memory Size Equivalent Denary Value
kilo 1 kilobyte (1 KB) 1 000
mega 1 megabyte (1 MB) 1 000 000
giga 1 gigabyte (1 GB) 1 000 000 000
tera 1 terabyte (1 TB) 1 000 000 000 000
peta 1 petabyte (1 PB) 1 000 000 000 000 000
84. Chapter 1: Information Representation > Recap> Binary Prefixes
Key Terms: Binary prefixes are prefixes to define the magnitude
of a value. Examples are kibi, mebi, gibi, and tebi.
Prefix Name of Memory Size Number of bytes Equivalent denary value (bytes)
kibi 1 kibibyte (1 KiB) 210 1 024
mebi 1 mebibyte (1 MiB) 220 1 048 576
gibi 1 gibibyte (1 GiB) 230 1 073 741 824
tebi 1 tebibyte (1 TiB) 240 1 099 511 627 776
pebi 1 pebibyte (1 PiB) 250 1 125 899 906 842 624
Since memory sizes are measured in terms of powers of 2, the base 10 numbering system is technically
inaccurate, hence another system has been introduced.
(Based on IEE Units)
85. Chapter 1: Information Representation > Recap> Binary Prefixes
Chapter 1: Information Representation > Recap> bits to bytes to KB to MB to GB to TB
86. Chapter 1: Information Representation > 1.2: Multimedia > Encoding Bitmapped Images
How data for a bitmap image is encoded?
• Data for a bitmapped image is encoded by assigning a solid color to
each pixel, i.e., through bit patterns.
• Bit patterns are generated by considering each row of the grid as a series
of binary color codes which correspond to each pixel’s color.
• These bit patterns are ‘mapped’ onto main memory
87. Chapter 1: Information Representation > 1.2: Multimedia > Encoding Bitmapped Images
How data for a bitmap image is encoded?
Watch the video for further explanation:
Digital Data: Image Encoding
https://www.youtube.com/watch?v=0TeQPizV1kg
While watching:
1. What is an image?
2. What is a bitmap?
3. What is the role of color lookup table?
88. Chapter 1: Information Representation > 1.2: Multimedia > Screen Resolution
Screen Resolution
• Number of pixels which can be viewed horizontally &vertically on the
device’s screen
• Number of pixels = width × height
E.g. 1680 × 1080 pixels
89. Chapter 1: Information Representation > 1.2: Multimedia > Color Depth and File Size
Color Depth
Color depth: number of bits used to represent the color of a single pixel
• An image with n bits has 2n colors per pixel
• E.g. 16-colour bitmap has 4 bits per pixel ∵ 24=1624=16
• Color depth↑: color quality↑ but file size↑
• File Size = Number of Pixels × color depth
• Convert bits to bytes by dividing by 8 if necessary.
91. Chapter 1: Information Representation > 1.2: Multimedia > Image Resolution
What happens if image resolution is increased?
• If image resolution increases, then image is sharper/more detailed
Watch the video for further explanation:
Image Resolution:
https://www.youtube.com/watch?v=wvb5oNuvBLU
While watching:
1. What is another term for image resolution?
2. To have a smoother circle, you need to have what?
3. What is the pixel density of a 2 X 2 inches2 image size having a 10 x 10 px pixel dimension?