0% found this document useful (0 votes)
18 views8 pages

Chapter 1

Uploaded by

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

Chapter 1

Uploaded by

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

Chapter1: Information representation

Number System
Denary: which are also known as decimal numbers are written using one of the symbols
0,1,2,3,4,5,6,7,8,9 for each denary digit
A base-10 number system
Eg:13,59,79,231

Binary: The binary number system is base-2. Each binary digit is written with either of the
symbols O and 1.A binary digit is referred to as a bit
A base-2 number system
Bit: a digit in the binary number system written using either of the symbols 0 and 1
Byte: a group of eight bits treated as a single unit
Eg:10100101,11110101,10101010

Hexadecimal: each hexadecimal digit is represented by one of the following symbols:


0,1,2,3,4,5,6,7,8,9, A, B,C,D,E,F, The symbols A through to F represent the denary
values 10 through to 15.
A base-16 number system
Eg:2A,5F,56C,5F6D

Binary to denary:
11110011——》-13
-128 64 32 16 8 4 2 1
1 1 1 1 0 0 1 1
-128*1+64*1+32*1+16*1+2*1+1*1=-13
Denary to binary:
15——》00001111
2|15 1
——
2|7 1
——
2|3 1
——
1
Hexadecimal to binary
5B——》01011011
2|5 1
——
2|2 0
——
1
0101
……

Binary to hexadecimal
01110010——》72
8421 8421
0111 0010
4*1+2*1+1*1=7
2*1=2
72

Sizes and quantities


Byte: a group of eight bits treated as a single unit (1byte = 8bits)

Nibble: a group of four bits (1nibble = 4bits)

The decimal prefixes: A prefix to define the magnitude of a value.


eg: kilo, mega, giga and tera
Decimal prefix name Symbol used Factor applied to the value
kilo k 10^3
mega M 10^6
giga G 10^9
tera T 10^12

The binary prefix: A prefix to define the magnitude of a value.


eg: kibi, mebi, gibi and tebi

2
Binary prefix name Symbol used Factor applied to the value
kibi Ki=KB 2^10
mebi Mi=MB 2^20
gibi Gi=GB 2^30
tebi Ti=TB 2^40

Internal coding of numbers


Unsigned integer: The integer that can only represents positive number and 0, It do not have any
sign behind the integer.
eg: 6,9,15,79,0

Signed integer: The integer that can represents positive number, negative number.
eg: +9,-11,-37,+5,-4

Two’s complement representation of a signed integer:


If negative ?
-12
2|12 0
——
2|6 0
——
2|3 1
——
1
00001100
One’s complement: Convert to negative(1 to 0, 0 to 1)
11110011
Two’s complement: Plus 1 at the right of binary number
11110011
+ 1
11110100

So -12 —》11110100
If positive ?
Normal calculation method
If reversed ?

3
The reversed method

Binary coded decimal (BCD): storage of a binary value representing one denary digit in a nibble
Purpose: Grouping bits in bytes to represent integers
Application: screen of a calculator, a digital time display
eg: 0.89 can be represented in BCD as follows:
0 in BCD = 0000
8 in BCD = 1000
9 in BCD = 1001
So, 0.89 in BCD format is 000010001001

Using the number


Binary arithmetic:
0+1=1
1+0=1
0+0=0
1 + 1 = 0 with a carry of 1
1 + 1 + 0 = 0 with a carry of 1
1 + 1 + 1 = 1 with a carry of 1
eg:
1011
+0001
1100

Overflow: a condition when the result of a calculation is too large to fit into the number of bits
defined for storage
eg:
1011
+0111
(1) 0 0 1 0

⬆️: (1) represents overflow

Problems with real values in binary:


Solution: store each denary digit as a BCD code.

4
BCD to represent currency values:
When a currency value is $300.25 it is as a fixed-point decimal number (ignoring the
dollar sign). It might be expected that such values would be stored as real numbers but
this cannot be done accurately
One solution to the problem is to store each denary digit as a BCD code.

BCD arithmetic:

Character Codes
ASCII Code (American Standard Code for Information Interchange)
7-bit version of the code
Conversion to and from lower and upper case:
Add 1 on bit-5
⬇️
Before: 0 1 0 0 0 0 1 0 →b
After: 0 1 1 0 0 0 1 0 →B

Unicode scheme:
Why use Unicode instead of ASCII?
ASCII code does not cover all the characters needed.
Aim: It can represent any possible text in code form.

5
Unicode code point identification: Unicode code point identification refers to the process of
identifying the unique numeric value assigned to each character in the Unicode character set.

Vector Graphic
Definition:
Vector graphic: a graphic consisting of drawing objects defined in a drawing list
Drawing object: a component defined by geometric formulae and associated properties
Drawing list: contains one set of values for each drawing object
Property: defines one aspect of the appearance of the drawing object

Used for images consisting of geometric objects:


In an image that is created by a drawing package or a computer-aided design (CAD) package
each component is an individual drawing object.

A vector graphic file contains a drawing list:


A vector graphic file contains a drawing list. The list contains a command for each object
included in the image. Each command has a list of attributes, each attribute defines a property of
the object

Dimensions are defined relatively:


that the dimensions of the objects are not defined exactly but instead are
defined relative to an imaginary drawing canvas.

Image can be scaled without loss of quality:


The appropriate calculations are made and the objects are drawn to a suitable
scale.
Can only be displayed directly on a graph plotter.
correctly on other types of display? ➔ has to be converted to a bitmap

Bitmap
Picture element (pixel): the smallest identifiable component of a bitmap image, defined by just
two properties: its position in the bitmap matrix and its color

Color depth: the number of bits used to represent one pixel

Bit depth: the number of bits used to represent each of the red, green and blue colors
Image resolution: the number of pixels in the bitmap file defined as the product of the width and
the height values

Screen resolution: the product of width and height values for the number of pixels that the screen
can display

Purpose: Displaying images, Image editing and manipulation, Graphics design and digital art,
Printing, Texture mapping.

Contain pixels as the smallest component


Pixel has a defined colour and position
A bitmap image has a defined resolution
Can be scaled but quality is affected

6
Calculate the size:
Size = resolution * colour depth
= width * height * colour depth
eg: size = 1366 * 768 * 24 = 25178112 bits

Size = resolution * bit depth


eg: bit depth = 3
size = 1366 * 768 * (3 * 3 * 3) = 28325376 bits

Header:
contains information on how the graphic has been constructed.
A bitmap file has a header containing meta data, which defines the colour depth or bit depth and
the resolution

Sound
Analogue data: data obtained by measurement of a physical property which can have any value
from a continuous range of values
Digital data: data that has been stored as a binary value which can have one of a discrete range
of values
Sampling: taking measurements at regular intervals and storing the value
Sampling resolution: the number of bits used to store each sample
Sampling rate: the number of samples taken per second

Sound arises from pressure changes.

Sound is an irregular analogue waveform:


ADC (Analogue-to-digital converter): the original analogue sound signal has to be converted


to a binary code.

Analogue data ➔ Digital data


Sound has to be sampled to be stored

Sampling has a defined sampling resolution and a defined sampling rate:


The number of bits we will use to store the amplitude values, which defines the sampling
resolution.
The sampling rate is the number of samples taken per second.


An Sampling rate increases and an sampling resolution increases

Increase in file size

Band-limiting filter(encoder):
Aim: removing high frequency components. A human ear cannot detect these very high
frequencies and they could cause problems for the coding if not removed.

Compression
Benefits: Lower transmission, Lower download rate
Purpose: Reducing the file size

7
Any binary data can be compressed

Lossless Compression:
No information is lost
Can be reversed to re-create the original file.
eg:Run-Length encoding: used for text and bitmap
Process:converts sequences of the same byte value into a code that defines the
byte value and the number of times it is repeated (the count).
eg:Huffman coding(Don’t need to learn)

Lossy Compression:
With some loss of information
Original file can never be recovered

Text data compression must be lossless, if it is lossy compression, the content of text file will be
destructed.

Lossy used for multimedia files

You might also like