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

Unit-3_SummaryNotes

The document covers the binary system, explaining its significance in digital data representation, including conversion methods between binary and denary systems, binary arithmetic, and the representation of negative numbers using sign and magnitude and two's complement. It also discusses data representation codes such as ASCII and Unicode, as well as data storage units and compression algorithms. The document highlights the importance of binary and hexadecimal systems in computing and data management.

Uploaded by

Coraline Jones
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)
9 views7 pages

Unit-3_SummaryNotes

The document covers the binary system, explaining its significance in digital data representation, including conversion methods between binary and denary systems, binary arithmetic, and the representation of negative numbers using sign and magnitude and two's complement. It also discusses data representation codes such as ASCII and Unicode, as well as data storage units and compression algorithms. The document highlights the importance of binary and hexadecimal systems in computing and data management.

Uploaded by

Coraline Jones
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/ 7

Unit – 3:

1. Chapter 12: Binary


There are 2 types of data in outside world: 1. Analog, 2. Digital
Analog: is a data that is represented with waves. Such as electrical data, audio data.
Digital: is a data that is represented with numbers.
But in our digital system, we use mostly digital data is called Binary. We use binary in our digital system because it is more
reliable, accurate and more long lasting than analog.
Representing Information
In our binary, we’ve 2 values, that is true or false. We can also represent it as 0 and 1. So it only 2 values to represent
data, it is not enough, so we make it as bits which is increasing the number of times it can represent data. When it becomes
8 bits, it becomes 1 byte.
Generally, Binary is base 2. When we draw up binary table, it starts from 2 0, because initial state of our digital devices is
off.

Binary System

Place 27 26 25 24 23 22 21 20
Values 128 64 32 16 8 4 2 1

Denary System: In denary system, the base is 10. So it gets multiplied based on 10, such as 10, 100, 1000, 10000, etc...
Converting Binary to Denary: there is only one method, that is to use place values table.
00111100 = Denary?
128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0
32 + 16 + 8 + 4 = 60
0011,1100 = 60
Converting Denary to Binary: there are 2 methods, that is to use place values and division.
Division: 60 = 0011,1100
Place Values:
100 = Binary?
128 64 32 16 8 4 2 1
0 1 1 0 0 1 0 0
100 = 0110,0100
60 = Binary?
128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0
60 = 0011,1100
Binary Arithmetic
Binary Addition: in binary addition, we will have to carry 1 when we add 1 and 1. But we can also see overflow error
when we add 1 + 1+ 1.
0011,1100 + 0110,0100 = 1010,0000
1 1 1 1 1
0 0 1 1 1 1 0 0
0 1 1 0 0 1 0 0
1 0 1 0 0 0 0 0

1101,0110 + 0110,0111 = 1,0011,1101 = overflow error


1 1 1
1 1 0 1 0 1 1 0
0 1 1 0 0 1 1 1
1 0 0 1 1 1 1 0 1
Overflow: is a condition that occurs when you add a number which greater to deal with computer.
In our binary, we only use binary to represent positive numbers. So, to represent negative numbers in binary system, we’ve
to use sign and magnitude, two’s complement.
Sign and Magnitude: In Sign and Magnitude, we use left most bit (most significant bit) as a sign which is negative
sign. Zero will represent positive and One will represent negative.
For Example –
100 = 0110,0100 but in sign and magnitude -100 = 1110,0100
In sign and magnitude, we cannot add our binary number because the result it will is either incorrect or it will overflow error.
7 = 0000,0111
-7 = 1000,0111
1 1 1
0 0 0 0 0 1 1 1
1 0 0 0 0 1 1 1
1 0 0 0 1 1 1 0 = -14 (incorrect value)

100 = 0110,0100
-100 = 1110,0100
1 1 1
0 1 1 0 0 1 0 0
1 1 1 0 0 1 0 0
1 0 1 0 0 1 0 0 0
256 128 64 32 16 8 4 2 1 = 328 (or) -78 (overflow @ incorrect value)
Two’s Complement: In two’s complement, we will be converting the binary values to its opposite one. In two’s
complement, there are 2 methods.
1. Reverse Calculation
2. Place Values.
Reverse Calculation: In this one, first you’ve to find the binary value of a denary number. Then flip the binary value to the
opposite one, such as, if the value is 0 then it is converted to 1, if the value is 1 then it is converted to 0. After flipping the
binary values, we will add 1 to that value in order to get binary value which will represent negative denary value.
For example:
60 = - 60
128 64 32 16 8 4 2 1
0 0 1 1 1 1 0 0 = 60

1 1 carries
1 1 0 0 0 0 1 1 = flip
1 = add 1
1 1 0 0 0 1 0 0 = - 60

60 = 0011, 1100
-60 = 1100, 0100
1 1 1 1 1
60 = 0 0 1 1 1 1 0 0
-60 = 1 1 0 0 0 1 0 0
0 = 1 0 0 0 0 0 0 0 0 (overflow)

Binary Shifts: With Normal Binary Arithmetic and Two’s Complement, we know how to add or sub in binary system but for
multiply and division, we’ve to use binary shifts.
In binary shifts: there are 2 types: Logical & Arithmetic.
Logical Shifts: it is for positive denary numbers. When multiplying, we will shift our binary numbers from right to left (left
shifts) and when dividing, we will shift our binary numbers from left to right (right shifts).
For example:
20 = 0001, 0100 = 4 (22) = 80 (20 x 4 = 80) (left shift)
0 0 0 1 0 1 0 0
0 0 0 1 0 1 0 0 0 0 = 64+16 = 80

(20 / 4 = 5) 20 = 0001,0100, 4 = 22 (right shift)


0 0 0 1 0 1 0 0
0 0 0 0 0 1 0 1 0 0 = 4+1=5

Activity 5
0011, 1010 * 23
0 0 1 1 1 0 1 0 = 58 x 8 = 464(Ans)
0 0 1 1 1 0 1 0 0 0 0 = 464 (overflow) (Ans)
0011, 1010 * 23 = 1101,0000 (Ans)
1001, 1101 / 24
1 0 0 1 1 1 0 1 = 157 / 16 = 9.8 (10)
0 0 0 0 1 0 0 1 1 1 0 1 = 9
Arithmetic Shifts: It will used for negative numbers. When multiplying, it will go left side (right to left) and dividing, it will
go right side (left to right). But when multiplying, it will replace the empty bits with zeros. When dividing, it will replace the
empty bits with ones.
Activity 6
Hexadecimal Numbers: In our digital system, we’ve binary, denary to represent numbers and data but we, human is hard
to remember 8 sets of zeros and ones, which is why ‘hexadecimal’ is invented. It is for human to use and to understand
more better at binary.
In our hexadecimal, we’ve total 16 values, which start from 0 and go up to 15.

Denary 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Hexadecim 0 1 2 3 4 5 6 7 8 9 A B C D E F 10
al

That’s why, we called hexadecimal as base 16.


Binary to Hexadecimal: 60 = 0011,1100 = 3C
0 0 1 1 1 1 0 0
8 4 2 1 8 4 2 1 = Place Value
3 12
3 C
Hexadecimal to Binary: 3C =?
3 C
3 12
8 4 2 1 8 4 2 1
0 0 1 1 1 1 0 0
3C = 0011,1100

2. Chapter 13: Data Representation


We’ve 3 types of data representation code: ASCII code, extended ASCII code and Unicode.
In our system, there are 96 printable characters and others are action keys such as space, tab, enter, backspace.

ASCII codes has 7 bits, so total characters it can represent is 128 characters but still it is not enough for other
language.
So, they created extended ASCII code which has 8 bits that represent 256 characters but each organization use
their own ASCII version. That’s why we don’t standardization. To overcome this, they created a Unicode which is
uniformed and it has 2 bytes or 4 bytes, which is 16 bits or 64 bits that can represent other languages.

In ASCII code, we’ve a range which represent numbers, characters.


65 – 90: uppercase
97 – 122: lowercase
48 – 57: numbers
32: space

We can also used binary to represent images and videos. In images and videos, it represent the colors with a
series of 0 and 1.
The quality of the image depends on the number of pixels and bit depth (color depth). The formula to calculate:
width * height * bit depth.
3. Chapter 14: Data Storage and Compression
Data Storage: There are 2 types of units that we use to represent data. They are Binary and Decimal Prefix.
Binary Prefix we also called it as a IEC unit (International Electrotechnical Commission) and Decimal Prefix, we
called it as SI unit (International System of Measurement).
Decimal Prefix
8 bits = 1 bytes
1000 bytes = 1 Kilobytes (KB)
1000 KB = 1 Megabytes (MB)
1000 MB = 1 Gigabytes (GB)
1000 GB = 1 Terabytes (TB)

Binary Prefix
8 bits = 1 bytes
1024 bytes = 1 Kibibytes (KiB)
1024 KiB = 1 Mebibytes (MiB)
1024 MiB = 1 Gibibytes (GiB)
1024 GiB = 1 Trebibytes (TiB)
Compression Algorithms: we’ve 2 types of it. Lossless and Lossy.
Lossless: it used mainly on the text which is documents and it uses a RLE (Run Length Encoding) Method to
compress.
Lossy: it mainly uses on the images, videos & audios.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy