Information Representation
Information Representation
Information Representation
1.1. Data Representation
-Deals with how different data is represented or stored in the computer
-The basis of any number system consists of:
• 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
Denary
- Number system which represents numbers in Base 10 integer digits
-Only certain digits are converted to BCD, because particular digits represent a digit greater
than 9.
Ex. 429 in BCD:
-Convert each digit to their binary equivalents 4 = 0100 | 2 = 0010 |9 = 1001
-Concatenate the 3 nibbles (4-bit group) to produce BCD: 0100 0010 1001
Practical applications
-A string of digits on any electronic device displaying numbers (eg. Calculators)
-Write the remainder as the answer and carry the resulting value(not the remainder) after
division operation
-E.g adding 0and1 :
-0+1=1
-Then 1/2= 0 r 1
-Then we take 1 and carry 0
-So 0+1=0
Arithmetic errors
a. Overflow error
-Arithmetic error that occurs when the result obtained after performing a binary
operation like addition contains excess number of bits that can not be represented in
a register
Hexadecimal Systems
-Defining Media Access Control (MAC) addresses Assembly languages and machine code
-Debugging via memory dumps
-IPV6 address
-E.g. A5 in Denary = (16×10) + (1×5) = 165
-E.g. 65 in Hexadecimal = 65÷16=4 Remainder 1∴ = 41
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
Character Encoding Standards:
ASCII Extended ASCII Unicode
ASCII’s extension - Also includes Superset for ASCII & extended ASCII -
Only English alphabets can mostEuropean languages’ recognized by various global languages
berepresented alphabets
Each character encoding ASCII extended to 8 bits, hence Greater range of characters, as it
takes up 256 uses 2 or 4 bytes per character.
7 bits, hence 128 possible possible characters.
characters
2 or 4 times morestorage space per
Smaller storage space.
character.
1.2. Multimedia
Bitmap Images
-Data for a bitmapped image is encoded by assigning a solid colour to each pixel, i.e., through
bit patterns.
-Bit patterns are generated by considering each row of the grid as a series of binary colour
codes which correspond to each pixel’s colour.
-These bit patterns are ‘mapped’ onto main memory
-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, including image size, number of colours, etc.
-Image Resolution: Pixel density which is measured by no. of pixels/cm If image resolution
increases, then image is sharper/more detailed
-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
-Colour depth: number of bits used to represent the colour of a single pixel
Sound
-Analogue data is continuous electrical signals whereas digital data is discrete electrical
signals.
Sampling Rate
-Number of samples taken per unit time Increasing the sampling rate increases accuracy of
digitized sound wave representation but increases the file size
Sampling Resolution
1.1. Compression
-Compression is the process of reducing file size without a significant loss in quality which
results in:
-Compress a file without resulting in loss of data, original state of the file is not changed
-E.g. bitmap (.bmp), vector graphic (.svg) and .png images, text file compression, database
records Run-length Encoding (RLE)
-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 file and pixels in bitmap images).
-Repeating sequence of elements encoded in two values: run count and run value.
-E.g. RLE of bitmap image:
-We can represent the first row as a sequence of pixels: “W B B W W B B W” | W: white and
B: black