0% found this document useful (0 votes)
20 views6 pages

Computer Sience

The document discusses the representation of sound and images, detailing how sound is sampled and recorded using amplitude measurements, and how images are composed of pixels with specific color depths. It also covers data compression methods, including lossy and lossless techniques, and explains data transmission, including packet structure, packet switching, and modes of transmission. Lastly, it highlights the Universal Serial Bus as a standard for serial data transfer.

Uploaded by

jindaljai666
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)
20 views6 pages

Computer Sience

The document discusses the representation of sound and images, detailing how sound is sampled and recorded using amplitude measurements, and how images are composed of pixels with specific color depths. It also covers data compression methods, including lossy and lossless techniques, and explains data transmission, including packet structure, packet switching, and modes of transmission. Lastly, it highlights the Universal Serial Bus as a standard for serial data transfer.

Uploaded by

jindaljai666
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/ 6

●​ Representation of sound-

○​ Sound is a form of analogue data


○​ Hence to record sound we need to sample the sound, we do
this by measuring the amplitude of the sound waves.
○​ To record the sound waves we measure the amplitude of the
sound at regular time intervals, we can't do this precisely so we
take approximated values.
○​ Let's say the amplitude range is from 0 to 10, value can be
represented with 4 bits, this is known as the sampling
resolution, but a low amplitude range generally gives inaccurate
results hence a higher range like 0 to 127 would give much
better results.
○​ Also if the amplitude range is high the sampling resolution will
have to be higher, if the amplitude range is 0 to 127 we will
need 7 bits per sample.
○​ The sampling resolution is also called the bit depth.
●​ Representation of images-
○​ An image is made up of pixels which is basically a part of an
image that stores some binary value which tells us what color
this pixel is.
○​ The number of bits used to represent one pixel is called the
color depth.
○​ If the picture is in black and white, the color depth is 1 as each
pixel can be either 1 for white and 0 for black.
○​ If the color depth is 4 then 4 bits are used to represent each
image.
○​ Lets say the image resolution is 1960x2000 and the color depth
is 8, the number of bits would be-
○​ 1960 * 2000 = 3, 920, 000 − 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑖𝑥𝑒𝑙𝑠
○​ 3, 920, 000 * 8 = 31, 360, 000 − 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠
○​ 31, 360, 000 / 8 = 3, 920, 000 − 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑦𝑡𝑒𝑠
○​ This step isn't required but it will be when the color depth is not
8
○​ 3, 920, 000 / 1000 = 3920 − 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑘𝑖𝑙𝑜𝑏𝑦𝑡𝑒𝑠
○​ 3920 / 1000 = 3. 92 − 𝑡ℎ𝑖𝑠 𝑖𝑠 𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑚𝑒𝑔𝑎𝑏𝑦𝑡𝑒𝑠
○​ Size conversion-
byte 8bits
kilobyte 1000 bytes
Megabytes 6
1000 kilobytes or 10 bytes
Gigabyte 9
1000 megabytes or 10 bytes
terabyte 12
1000 gigabyte or 10 bytes
●​ Data compression-
○​ Means to reduce the data in the given file or image
○​ This saves storage,
○​ Reduces downloading/uploading time
○​ Reduces file size and cost(in cloud storage you pay based on
the size)
○​ Types of data compression-
■​ lossy -
●​ In this the algorithm eliminates any data deemed
unworthy of living.
●​ The original file can not be restored once the
process is complete.
●​ This may apply to-
○​ images - it may reduce the resolution or color
depth.
■​ Example- JPEG files
○​ sound - may reduce resolution or the sampling
rate.
■​ Example- mp3 and mp4 files
■​ Lossless-
●​ With this technique all the data that is compressed
can be restored. This is important for files which if
they lose data the file will no longer work.
●​ An example of one kind of technique is called Run
Length Encoding or RLE for short-
●​ It works by combining identical data that are
adjacent to each other.
●​ Example-
○​ The text is - aaaabbbbcccc​
○​ Let's say a in binary is 10000
○​ Let's say b in binary is 10001
○​ Let's say c in binary is 10010
○​ Normally the entire code is - 10000 10000
10000 10000 10001 10001 10001 10001
10010 10010 10010 10010
○​ But with RLE we can convert this into- 00100
10000 00100 10001 00100 10010, this means
4 a 4 b 4 c as 00100 is 4.
○​ Using RLE we halved the number of bits
required without deleting any important data.
○​ Read the text book for more information

CH2-
●​ Data types and methods of data transmission-
○​ To send data over long distances we have to break it down to
make it easier to transfer it.
○​ These pisces are known as data packets
○​ Each packet takes its own route from the sender to the receiver.
●​ Packet structure-
○​ The data is divided into 3 different parts-
○​ The header- it does not contain any data from the main data but
has important information nonetheless, which is-
■​ Sender ip
■​ Size of the data
■​ Sequence of the packets
■​ Receivers ip
■​ Or SSSR
○​ The payload- it contains the main data, it has many parts that
all have a part of the original data.
○​ The trailer- it contains 2 things-
■​ Some way of identifying the end of the data
■​ The packet sequence to make sure there is no error in the
sequence.
■​ And it stores the total number of 1s and 0s as a form of
error checking; this is called a cyclic redundancy check.
●​ Packet switching-
○​ It is a method of data transmission, it basically sends each
packet on its own route to the receiver.
○​ Each packet takes its own path
○​ The routers will determine the route,
○​ The route taken by each packet may not be the shortest but
due to traffic it had to take a different path which will be faster at
that point of time.
○​ But the packets will reach in a different order.
○​ Benefits-
■​ High data transmission rate is possible
■​ No need for single communication line
■​ If there is too much traffic the data can be re-routed.
○​ Downsides-
■​ Packets can be lost during transmission so the data has
to be resent
■​ Prone to error with real time streaming
■​ There is delay at the destination due to the need to re
order the packets.
○​ Data hopping-
■​ When there is a lot of traffic everywhere the packets tend
to keep on bouncing from one route to another causing
them to get stuck.
■​ To prevent this each packet is assigned a hop number
which is a value that will decrease by 1 each time the
packet bounces.
■​ Let's say the packet is assigned a hop number 10, this
means that the packet can bounce 10 times the moment it
bounces once more the packet will get deleted.
■​ The missing packet will be flagged by the receiver and the
data will be resent.
■​ This is done to prevent a lot of packets from clogging the
routes and generating a lot of traffic.
●​ Modes of transmission data-
○​ The mode of transmission is the way the data is sent
○​ There are 3 types-
■​ Simplex- where the data can be sent from device to
another but not the other way around, example-
computer to printer
■​ Half-duplex- where the data can be sent from both the
directions but not at the same time, example- walkie
talkie.
■​ Full duplex- where the data can be sent from both
directions at the same time, example- the internet.
●​ Types of data transmission-
○​ There are two types-
■​ Serial transmission- where the data is transferred 1 bit at
a time along a single connection one after the other
Example- USB
■​ Parallel transmission- where the data is transferred
several bits or bytes at a time over multiple
connections.
Example- packet switching
○​ Difference- read book (too much to write) page no 52 .
●​ Universal Serial Bus-
○​ It is a form of serial transmission, it is used to transfer and store
data, it is the globally accepted method for input and output or
you could say physically transferring data.
●​

You might also like