0% found this document useful (0 votes)
12 views9 pages

Number System Notes

The document provides an overview of various number systems including decimal, binary, octal, and hexadecimal, along with their conversion techniques. It also covers character encoding standards such as ASCII, extended ASCII, ISCII, and Unicode, detailing their encoding schemes like UTF-8, UTF-16, and UTF-32. Additionally, it includes practice questions and exercises related to number conversions and binary addition.

Uploaded by

Not Alina
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)
12 views9 pages

Number System Notes

The document provides an overview of various number systems including decimal, binary, octal, and hexadecimal, along with their conversion techniques. It also covers character encoding standards such as ASCII, extended ASCII, ISCII, and Unicode, detailing their encoding schemes like UTF-8, UTF-16, and UTF-32. Additionally, it includes practice questions and exercises related to number conversions and binary addition.

Uploaded by

Not Alina
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

DOHA MODERN INDIAN SCHOOL

Grade: 11 C.S.
Chapter: Number System
NUMBER SYSTEM

Decimal number system


The number system is composed of 10 symbols(0,1,2,3,4,5,6,7,8,9) with base 10.
Ex: (28)10

Binary number system


The number system is composed of 2 unique symbols: 0 and 1, and it is easy to use number
system with base 2.
Ex: (10001101) 2

Octal number system


 Octal number system is composed of 8 symbols (0, 1, 2, 3,4,5,6 and 7) with base 8.
Ex: (157)8

Hexadecimal number system

 Hexadecimal number system uses base 16 from 0 - 9 and A, B, C, D, E, F as 16


symbols.
Quantities/Counting

Decimal to Binary Conversion


• Technique
– Divide by two, keep track of the remainder
– First remainder is bit 0 (LSB, least-significant bit)
– Second remainder is bit 1
– Etc.

Binary to Decimal Conversion


• Technique
– Multiply each bit by 2n, where n is the “weight” of the bit
– The weight is the position of the bit, starting from 0 on the right
– Add the results
Practice Questions:
(a) Convert the Decimal number 781 to its Binary equivalent.
(b) Convert Binary number 101101to its decimal equivalent.
(c)Convert the Decimal number 816 to its Binary equivalent.
(d) Convert Binary number 11100 to its decimal equivalent.

Decimal to Binary & Binary to Decimal Conversion (Fractional Values)

A floating point decimal number consists of two parts. An integer part which is to the left of
the decimal point and a fractional part which is to the right of the decimal point.
• Example: 16.30 is a floating point decimal number.
The integer part of this number is 16 and the fractional part of the number is 0.30 and
together they make up the number.

Conversion of floating point decimal to binary


• First convert the integer part into binary form.
• Then covert the fractional part into binary form.
• Finally combine the two to get the result.
Example: (16.30)10
Convert (16.30)10 to Binary
Conversion of floating point binary to decimal

Decimal to Octal Conversion


• Technique
– Divide by 8
– Keep track of the remainder

Octal to Decimal Conversion


• Technique
– Multiply each bit by 8n, where n is the “weight” of the bit
– The weight is the position of the bit, starting from 0 on the right
– Add the results

Octal to Binary Conversion


• Technique
– Convert each octal digit to a 3-bit equivalent binary representation
Binary to Octal Conversion
• Technique
– Group bits in threes, starting on right
– Convert to octal digits

Decimal to Hexadecimal Conversion

• Technique
– Divide by 16
– Keep track of the remainder

Hexadecimal to Decimal Conversion


• Technique
– Multiply each bit by 16n, where n is the “weight” of the bit
– The weight is the position of the bit, starting from 0 on the right
– Add the results
Hexadecimal to Binary Conversion
• Technique
– Convert each hexadecimal digit to a 4-bit equivalent binary representation.

Binary to Hexadecimal Conversion


• Technique
– Group bits in fours, starting on right
– Convert to hexadecimal digits

Octal to Hexadecimal Conversion


• Technique
– Use binary as an intermediary
Hexadecimal to Octal Conversion
• Technique
– Use binary as an intermediary

Binary Addition
• Two 1-bit values

• Two n-bit values


– Add individual bits
– Propagate carries
E.g.,
Practice Questions:
• Add the binary numbers 1011 and 110.
• Add the binary numbers 11110 and 11.
• Add the binary numbers 11100 and 11010.
• Add the binary numbers 01010111 and 00110101.
• Add the binary numbers 11.01 and 101.11.

Exercises:
(a) Convert the Decimal number 781 to its Binary equivalent.
(b) Convert Binary number 101101.001 to its decimal equivalent.
(c) Convert octal number 321 into its Binary equivalent.
(d) Covert the Hexadecimal number 3BC into its Binary equivalent
(e) Convert the Binary number 1001101010101 to its Hexadecimal equivalent.
(f) Convert the Decimal number 345 into octal number.
(g) Add the binary numbers 110101 and 101111.

Character/String Representation
What is ASCII ?
It is acronym for the American Standard Code for Information Interchange.
It is used in most microcomputers and minicomputers and in many mainframes.
It is a 7-bit code so it has 27 = 128 possible code groups.

What is extended ASCII?


• Extended ASCII uses 8-bits to represent various characters.
• It has 28 = 256 possible character code groups.

What is ISCII?
It is acronym for Indian Standard Code for Information Interchange.
It is a 8-bit code so it has 28 = 256 possible code groups.
It retains all ASCII characters and offers coding for Indian characters also.

What do you understand by Unicode?


It is the new universal coding standard being adopted all newer platforms.
Unicode provides a unique number for every character, no matter what the platform or
program or the language is.
 Unicode provides a unique number for every character,
 No matter what the platform
 No matter what the program.
 No matter what the language.

What does Unicode Transformation Format (UTF) mean?

• The Unicode Transformation Format (UTF) is a character encoding format which is


able to encode all of the possible character code points in Unicode.
• The most prolific is UTF-8, which is a variable-length encoding and uses 8-bit code
units, designed for backwards compatibility with ASCII encoding.
• The Unicode Transformation Format is also known as the Universal Transformation
Format.
Encoding Terminology
Encoding Scheme
It is a predefined way for converting information, character by character in a machine
intelligible code. Same character set may be represented through different encoding
schemes.

Unicode Encoding Schemes


Unicode defines multiple encoding systems to represent characters. These are UTF-8, UTF-
16 and UTF-32.

UTF-8
• UTF-8 founder is Ken Thompson.(Creator of UNIX)
• UTF-8 is a variable-width encoding that can represent every character in Unicode
character set.
• The code unit of UTF-8 is 8 bits called an octet
• UTF-8 can use 1 to maximum 6 octets to represent code points depending on their
size.
• UTF-8 is a type of multi-byte encoding.

UTF -16

UTF-16 (16-bit Unicode Transformation Format) is a character encoding capable of


encoding all 1,112,064 valid code points of Unicode.
The encoding is variable-length, as code points are encoded with one or two 16-bit code
units.

What is the difference between UTF - 8 and UTF - 16?


• UTF-8 and UTF-16 both handle the same Unicode characters. They are both variable
length encodings that require up to 32 bits per character.
• The difference is that UTF-8 encodes the common characters including English and
numbers using 8-bits.
• UTF-16 uses at least 16-bits for every character.

UTF-32

• UTF-32 (32-bit Unicode Transformation Format) is a fixed-length encoding used to


encode Unicode code points that uses exactly 32 bits (four bytes) per code point
(but a number of leading bits must be zero).
• UTF-32 is a fixed-length encoding, in contrast to all other Unicode transformation
formats, which are variable-length encodings.
• Each 32-bit value in UTF-32 represents one Unicode code point and is exactly equal
to that code point's numerical value.
• The main advantage of UTF-32 is that the Unicode code points are directly indexed.
• The main disadvantage of UTF-32 is that it is space-inefficient, using four bytes per
code point, including 11 bits that are always zero.

You might also like