KEMBAR78
CH 1 Notes | PDF | Data Compression | Image Resolution
0% found this document useful (0 votes)
5 views8 pages

CH 1 Notes

The document provides an overview of fundamental concepts in computer science, including data representation such as bytes, binary coded decimal (BCD), ASCII, and Unicode. It explains binary number systems like one’s and two’s complement, as well as image formats like vector graphics and bitmap images, detailing their properties and differences. Additionally, it covers audio sampling, resolution, and compression techniques, distinguishing between lossy and lossless compression methods.

Uploaded by

Syeda Fatima
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)
5 views8 pages

CH 1 Notes

The document provides an overview of fundamental concepts in computer science, including data representation such as bytes, binary coded decimal (BCD), ASCII, and Unicode. It explains binary number systems like one’s and two’s complement, as well as image formats like vector graphics and bitmap images, detailing their properties and differences. Additionally, it covers audio sampling, resolution, and compression techniques, distinguishing between lossy and lossless compression methods.

Uploaded by

Syeda Fatima
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/ 8

Chapter 1 Notes

Byte:
A group of 8 bits treated as a single unit

AN
8bits= 1 byte

4bits = 1 nibble

1024 bytes = 1 kilobyte or (2 ^ 10 bytes written as Kibi)

KH
1024 kibi = 1 Megabyte or (2^20 bytes written as Mebi)

1024 MB = 1 Gigabyte or (2^30 bytes written as Gibi)

One’s complement:

 The binary number obtained by subtracting each digit in a binary number from 1

M
In practice it means each 0 is switched to 1 and each 1 switched to zero(Inversing the values)

e.g. 24 in denary can be written in binary (8 bits)


RA
00011000

For one’s compliment it can be written as

11100111
UR

Two’s complement;
 The one’s compliment of a binary number plus 1
KH

For example expressing the number 10100100 into its two compliment form is as follows;

 first take the inverse of the number 10100100 which will be 01011011
 then add +1 in the inverse of binary value as follows;
01011011
+ 1
R

01011100
SI

 After addition of +1 the value 01011011 becomes 0101110


 keeping in mind that the most significant bit(top left) of 0101110 has a negative
sign when representing in two's compliment
Sign and magnitude :
 top left most bit have a negative sign with it
 for negative number top left bit in binary will be 1
 for positive number top left bit in binary will be 0
 for 8 bit format the 8th bit will represent sign the rest will

AN
represent magnitude.

example write -13 in sign and magnitude form

KH
which will be written as
1|1110011

 since 8 bits so top left bit will have value 128


 but since it's a negative number it will be written as
-128

M
subtract the values from - 128 in such a way that it
RA
should make - 13 in this case 64(7th bit) + 32(6th bit)
+16(5th bit) + 2 (2nd bit) + 1 (1st bit) makes 115
so -128 + 115 = -13
 remember that most significant bit is not
UR

included in addition of sign and magnitude


representation
KH
R
SI
Binary Coded decimal (BCD):
 Binary coded decimal means grouping bits in bytes to represent integers
 This code uses four bits(1 nibble) to represent denary digit.
 This four bit code can represent 16 different values like as of hexadecimal number system

AN
Example conversion of the following denary number into BCD;

KH
8503

One BCD per digit


byte
Two BCD digits per
byte
00001000
(8)

M
00000101
(5)
10000101
(8) and (5)
00000000
(0)
00000011
(0) and (3)
00000011
(3)
RA
UR
KH
R
SI
AN
KH
M
ASCII Code:(American Standard code for information Interchange): & Unicode
RA
 For a text need to be stored in a computer it is necessary to have coding scheme that
provides unique binary code for each individual component of text. Such a code is
referred to as character code.
UR

 ASCII is one of the globally renowned character code used and accepted throughout the
world
 A character set is represented in a computer by either ASCII or Unicode which is unique
to that specific character like A= 65 but in computer it is represented as set of bits
KH

usually one or 2 bytes like A is represented as in binary (01000001)


 Character sets are the symbols used by computer which often equates to the symbols
on the keyboard.
 Unicode is another type of scheme used for the same purpose except the only
difference between these schemes is that a identifier name is given to them which
includes all languages of the world.
R
SI
Vector graphic:

AN
Vector graphic is a graphic consisting of components defined by
geometrical formulae and associated properties such as line color and
style.
 In other words we can say it is and image mode of drawing

KH
objects where the properties of each object is determined by its
shape and appearance.
 A vector graphic file contains a drawing list.The list contains a
command for each object to be included in the image.
 Each command has list of attributes which include basic
geometrical data such as for circle the position of center of circle
and it's radius.

M
 Addition properties such as thickness and style of line,color of line
RA
, color that fills shape is defined.
 Most importantly vector graphic image is scalable i'e whenever
image is to be displayed, the file is read and appropriate
calculations are made until object is drawn to suitable scale
UR

according to user requirement.

Bitmap image:
KH

 Bitmap image is a image made of rows and columns of picture elements.


 The fundamental concept underlying in creation of bitmap file is that of
picture element.
 Pixel or picture element is the smallest identifiable component of bitmap
R

image defined by just two properties 1) its position in the bitmap 2) its
color.
SI

 Image is stored in two dimensional matrix of pixel.To construct a pixel it


should have position in matrix and color.
 One bit is used to represent the color so that pixel is either black or
white.
 storage of color in 4 bits would allow simple grey scale color.
 At least 8 bits per pixel are necessary to code color image.

Color depth;
The number of bits per pixel is called color depth.
 Bitmap file does not have a physical size of pixel or of whole

AN
image. The image is scalable but if a image is magnified too far the
quality of display it will deteriorate.

KH
Image resolution;
This value determine the amount of detail the image has.It is
measured in dots per inch (dpi).

M
Image file handler;
It specifies the image size, number of colors and data needed to
display image data.
RA
Screen Resolution:
Values quoted for a monitor specification such as 1024 x 768.
The larger the number of screen resolution the more picture
UR

element will be displayed.

Sampling resolution;
KH

 Representation used to write samples in digital sound recording.


 Resolution means here is number of distinct values available to
encode/represent each sample.
 Specified by number of bits used to store each sample.
R

 Also referred as bit depth.


 Higher the sampling resolution the smaller will be the
SI

quantization error.
 higher the sampling resolution there will be less distortion of
sound.
Sampling rate:
 Number of times the amplitude of analog sound wave is
taken/measured.
 it is taken per unit time/per second
 higher the sampling rate more accurate will be its digital

AN
representation.

KH
Sampling used to record sound clips:
 The height/Amplitude of sound wave was determined ar a
set of time intervals e.g. sensible time period to get
approximation of sound wave.
 These sound waves are then encoded as sequence of

 M
binary numbers and converted into digital signals using
ADC(Analog to digital converter).
Increasing the sampling rate will improve accuracy of
RA
recording.

Lossy Compression;
A coding technique that allows subsequent decoding to recreate exactly the
UR

original file.
 In lossy compression during compression of file the size of file is reduced with
some information is also lost.
 In lossy file size reduction is greater than lossless.
KH

 Lossy compression is used in circumstances where a sound file or an image file


can have some of detailed coding removed or modified when it is likely that
human ear or eye will hardly notice any difference.
 One example could be of conversion to mp3 files or reduce the color depth
for coding of a bitmap.
R
SI

Lossless compression:
Coding technique that allows subsequent decoding to recreate
exactly the original file.
 None of the original data is lost when file is compressed/when
decompressed file will be identical to original file.
 If a file contain text the compression will be lossless because it will
not be sensible to allow any loss of information.

AN
KH
M
RA
UR
KH
R
SI

You might also like