Chapter-1 A Levels
Chapter-1 A Levels
1
Author : Mhuammad Waseem sabri Mobile :03456888208
Information Representation
Data Representation
A base: the number of digits that a number system can use to represent numbers
Place value for each digit: digits in certain positions have a specific value
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0
E.g. 65 in binary is 1000001
Binary representation where each positive denary digit is represented by a sequence of 4 bits (nibble)
Only certain digits are converted to BCD, because particular digits represent a digit greater than 9.
Concatenate the 3 nibbles (4-bit group) to produce BCD: 0100 0010 1001
Practical applications
Two’s Complement
We can represent a negative number in binary by making the most significant bit (MSB) a sign bit, which
Find the binary equivalent of the denary number (ignoring the -ve sign) | 42 = 101010
Add extra 0 bits before the MSB, to format binary number to 8 bits | 00101010
Add 1 | 00101010
Practical applications:
Character Sets
A character set generally includes upper & lower case letters, number digits, punctuation marks and
other characters.
Character sets use different binary representations for each character via character encoding
Each character encoding takes ASCII extended to 8 bits, Greater range of characters, as
up 7 bits, hence 128 possible hence 256 possible it uses 2 or 4 bytes per
characters characters. character.
Multimedia
Bitmap Images
Data for a bitmapped image is encoded by assigning a solid colour to each pixel, i.e., through bit
patterns.
4
Author : Mhuammad Waseem sabri Mobile :03456888208
Bit patterns are generated by considering each row of the grid as a series of binary colour codes which
Pixels: smallest picture element whose colour can be accurately represented by binary
Bitmap image also contains the File Header which has the metadata contents of the bitmap file,
Image Resolution
Screen Resolution
Number of pixels which can be viewed horizontally & vertically on the device’s screen
Colour depth: number of bits used to represent the colour of a single pixel
Applications: scanned images and general computer usage ∵ small file size and can be easily
manipulated.
Vector Graphics
Drawing objects: a mathematically defined construct (of shapes like rectangle, line, circle, etc.)
Properties of each object are the basic geometric data which determine the shape and appearance.
Data is encoded using mathematical formulas to generate properties in order to draw lines & curves to
Sound
Analogue data is continuous electrical signals whereas digital data is discrete electrical signals.
Sound signals are vibrations through a medium. Hence are analogue in nature as there can be an infinite
Sampling Rate
Increasing the sampling rate increases accuracy of digitized sound wave representation but increases
Sampling Resolution
Increasing sampling resolution increases accuracy of digitized sound wave but increases the file size
Compression
Compression is the process of reducing file size without a significant loss in quality which results in
Faster transfer of compressed files, which uses less bandwidth than uncompressed files.
Lossless Compression
Type of compression that allows original data to perfectly reconstructed from compressed file when the
E.g. bitmap (.bmp), vector graphic (.svg) and .png images, text file compression, database records
Form of lossless compression which is used for compressing text files and bitmap images.
Reduces file size of a sequence of elements which has adjacent, identical elements (characters in text
Repeating sequence of elements encoded in two values: run count and run value.
We can represent the first row as a sequence of pixels: “W B B W W B B W” | W: white and B: black
In ‘2B’ 2 is the run count and B is the run value, which represents a run of two adjacent black pixels
Lossy Compression
File accuracy/quality lower than that of lossless but file size is lower (~10% of lossless).
Sound files compression (.mp3) utilizes Perceptual Coding to remove certain parts of sound that are less