0% found this document useful (0 votes)
11 views7 pages

Information Representation

The document discusses various data representation methods in computing, including denary, binary, and hexadecimal systems, as well as character encoding standards like ASCII and Unicode. It also covers multimedia data types such as bitmap images and sound, detailing concepts like sampling rate and compression techniques, both lossless and lossy. Key applications and practical uses of these representations in technology are highlighted throughout.

Uploaded by

tateagrii
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)
11 views7 pages

Information Representation

The document discusses various data representation methods in computing, including denary, binary, and hexadecimal systems, as well as character encoding standards like ASCII and Unicode. It also covers multimedia data types such as bitmap images and sound, detailing concepts like sampling rate and compression techniques, both lossless and lossy. Key applications and practical uses of these representations in technology are highlighted throughout.

Uploaded by

tateagrii
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/ 7

1.

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

-Uses 10 possible numbers, 0-9


Binary Systems
- Number system which represents numbers in Base 2 integer digits
Possible bits (binary digits): 0 and 1
All data and characters are represented in binary
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0

-E.g. 65 in binary is 0100001

Denary vs. Binary prefixes:


DenaryPrefix factor value BinaryPrefix factor value
kilo- (k) ×10^3 kibi- (Ki) ×2^10
mega- (M) ×10^6 mebi- (Mi) ×2^20
giga- (G) ×10^9 gebi- (Gi) ×2^30
tera- (T) ×10^12 tebi- (Ti) ×2^40

Binary Coded Decimal (BCD)


-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.
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)

-Accurately measuring decimal fractions Electronically coding denary numbers


Two’s Complement
-Used to represent negative numbers
-We can represent a negative number in binary by making the most significant bit (MSB) a
sign bit, which indicates whether the number is positive or negative.
-Converting negative denary into binary (ex. -42)
-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

-Convert binary number to one’s complement (flip the bits) | 11010101


-Convert binary number to two’s complement (add 1)|1010101 + 1 = 11010110
Converting binary two’s complement into denary (ex. 11010110)
-Flip all the bits | 00101001 Add 1 | 00101010
-Convert binary to denary and put a –ve sign) | -42 Maximum positive number in 8 bits: 256

Maximum negative number in 8 bits: -128

Binary Addition and Subtraction


-Add or subtract the two numbers, divide the answer by 2(base)

-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

-Number system which represents numbers in base 16


-Possible digits: 0 to 9 and A to F, where A to F represent denary digits 10 to 15
Practical applications/ uses of Hexadecimal:
-Defining colours in HTML

-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

-An image with n bits has 2n colours per pixel


-E.g. 16-colour bitmap has 4 bits per pixel ∵ 2^4 = 16
-Colour depth↑: colour quality↑ but file size↑ File Size = Number of Pixels × colour depth
-Convert bits to bytes by dividing by 8 if necessary. Applications: scanned images and general
computer usage ∵ small file size and can be easily manipulated.
-Vector Graphics

-Made up of drawing objects


-Drawing objects: a mathematically defined construct (of shapes like rectangle, line, circle,
etc.)
-Drawing list: set of commands defining the vector 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 create the image
-If object is resized, properties are recalculated.

∴ Scalable without losing quality unlike bitmaps Applications: company logos

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 amount of detail for sound.
-Analogue signals converted (encoded) to digital signals by sampling:
-Sound wave’s amplitude (height) sampled at set time intervals

-These samples (amplitudes) are encoded as a binary number sequence


-This sequence provides a digital representation of the sound wave

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

-Number of bits used to encode each sample


-Increasing sampling resolution increases accuracy of digitized sound wave but increases the
file size
-Bit Rate: no. of bits for storing 1 second of sound

-Bit Rate = Sampling Rate × Sampling Resolution


-File Size=Bit Rate * Length of Sound

1.1. Compression
-Compression is the process of reducing file size without a significant loss in quality which
results in:

• Reducing the time needed to search for data.


• 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 file is opened by utilizing some form of replacement.

-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

-After applying RLE: “W 2B 2W 2B W”.


-In ‘2B’ 2 is the run count and B is the run value, which represents a run of two adjacent black
pixels

-Process is repeated for other rows.


Lossy Compression
-Type of compression which irreversibly eliminates unnecessary data
-File accuracy/quality lower than that of lossless but file size is lower (~10% of lossless).

-E.g. Sound files (.mp3), .jpeg images


-Sound files compression (.mp3) utilizes Perceptual Coding to remove certain parts of sound
that are less audible/discernible to human hearing.

You might also like