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

CLASS 11 CH-1 Number System

The document provides an overview of number systems, including binary, octal, and hexadecimal, along with methods for converting between them and to decimal. It discusses data representation in computers, including integer and floating-point representations, as well as character encoding standards like ASCII and Unicode. Additionally, it covers binary arithmetic operations such as addition and subtraction using 1's and 2's complement methods.

Uploaded by

Sushma Sahani
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)
6 views9 pages

CLASS 11 CH-1 Number System

The document provides an overview of number systems, including binary, octal, and hexadecimal, along with methods for converting between them and to decimal. It discusses data representation in computers, including integer and floating-point representations, as well as character encoding standards like ASCII and Unicode. Additionally, it covers binary arithmetic operations such as addition and subtraction using 1's and 2's complement methods.

Uploaded by

Sushma Sahani
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/ 9

Number System:

It is a systematic way to represent numbers in different ways. Each number system has its own
Base, that is a number and that number of symbols or digits used.

1. Most Significant Digit (MSD): The digit with most weight is called MSD. MSD is also called
Left Most Digit(LMD)
2. Least Significant Digit (LSD): The digit with least weight is called LSD. LSD is also called
Right Most Digit(RMD)
 eg: 106 : Here MSD : 1 and LSD : 6
 345.78: Here MSD : 3 and LSD : 8
3. A Binary Digit is also called a bit.
4. The weight of each digit of a number can be represented by the power of its base.

Number conversions:
In general, to convert a decimal number into another number system(binary or octal or
hexadecimal) do the following. Divide the number successively by the base of the number system
do you want to convert and write down the remainders from bottom to top.

To convert a decimal fraction into another number system .multiply the number by the base of the
number system do you want to convert then integer part and fractional part are separated again
multiply the fractional part by the base and do the steps repeatedly until the fractional part
becomes zero. Finally write down the integer part from top to bottom.

Decimal to Binary:
Divide the number by the base 2 successively and write down the remainders from bottom to top.

Decimal fraction to binary:


multiply the number by the base 2 then integer part and fractional part are separated again
multiply the fractional part by the base 2 and do the steps repeatedly until the fractional part
becomes zero. Finally write down the integer part from top to bottom.
Decimal to Octal:
Divide the number by the base 8 successively and write down the remainders from bottom to top.

Decimal fraction to octal:


multiply the number by the base 8 then integer part and fractional part are separated again
multiply the fractional part by the base 8 and do the steps repeatedly until the fractional part
becomes zero. Finally write down the integer part from top to bottom.
eg: (55)10 = ()8

(0.140625)10 = (0.11)8

Decimal to Hexadecimal:
Divide the number by the base 16 successively and write down the remainders from bottom to top.

Decimal fraction to hexadecimal:


multiply the number by the base 16 then integer part and fractional part are separated again
multiply the fractional part by the base 16 and do the steps repeatedly until the fractional part
becomes zero. Finally write down the integer part from top to bottom.

Converting a number from any number system into decimal: For this multiply each digit by its
corresponding weight and sum it up.

Binary to decimal conversion:


For this multiply each bit by its corresponding weight and sum it up. The weights are power of 2.

Converting binary fraction to decimal


101.101 = 1 × 22 + 0 × 21 + 1 × 20 + 1 × 2-1 + 0 × 2-2 + 1 × 2-3
= 4 + 0 + 1 + 1/2 + 0 + 1/8
= 5 + 0.5 + 0.125
(101.101)2 = (5.625)10

Octal to decimal conversion:


For this multiply each bit by its corresponding weight and sum it up. The weights are power of 8.
Eg: (1007)8 =()10?

1 × 8 3 + 0 × 82 + 0 × 81 + 7 × 8 0
= 512 + 0 + 0 + 7
=(519)10
Converting octal fraction to decimal (600.005)8 =()10?

= 6 × 82 + 0 × 81 + 0 × 80 + 0 × 8-1 + 0 × 8-2 + 5 × 8-3


= 384 + 0 + 0 + 0 + 0 + 0.009765625
= (384.009765625)10

Hexadecimal to decimal conversion:


For this multiply each bit by its corresponding weight and sum it up. The weights are power of 16.
Eg: (100)16 = ()10?

= 1 × 162 + 0 × 161 + 0 × 160


= 256 + 0 + 0
= (256)10
Converting Hexadecimal fraction to decimal (60A.4)8 =()10?
= 6 x 162 + 0 x 161 + 10 x 160 + 4 x 16-1
= 1536 + 0 + 0 + .25
= (1536.25)10

Octal to binary conversion:


Convert each octal digit into its 3 bit binary equivalent. Consider the following table
Hexadecimal to binary conversion:
Convert each Hexadecimal digit into its 4 bit binary equivalent. Consider the following table

1010 1011 1100 (ABC)16=(101010111100)2

Binary to octal conversion


Divide the binary number into groups of 3 bits starting from the right to left(But in the fractional part
start dividing from left to right). Insert necessary zeros in the left side(or right side in the case of
fractional part)if needed and write down the corresponding octal equivalent.
eg: (10100110)2= ()8?
Insert one zero in the left side to form 3 bits group

(10100110)2= (246)8

Binary to Hexadecimal conversion:


Divide the binary number into groups of 4 bits starting from the right to left(But in the fractional part
start dividing from left to right). Insert necessary zeros in the left side(or right side in the case of
fractional part)if needed and write down the corresponding Hexadecimal equivalent.
eg: (100100110)2 = ()16?
Insert 3 zeros in the left side to form 4 bits group
(100100110)2 = (126)16

Octal to Hexadecimal conversion:


First convert octal number into binary(see 1.6.7), then convert this binary into hexadecimal(also
see 1.6.10)
eg: Convert (67)8 = ( )16
Step I: First convert this number into binary equivalent for this do the following:

Step II: Next convert this number into hexadecimal equivalent for this do the following.

So the answer is (67)8 = ( 37)16

Hexadecimal to octal conversion:


First convert Hexadecimal to binary(see 1.6.8), then covert this binary into octal(also see 1.6.9)
eg: Convert (A1)16 = ( )8?
Step I: First convert this number into binary equivalent. For this do the following

Step II. Next convert this number into octal equivalent. For this do the following.
So the answer is (A1)16 = (241)8

Data representation:
The data stored in the computer memory is in the form of binary.

Representation of integers
There are three ways to represent integers in computer. They are as follows:

1. Sign and Magnitude Representation (SMR)


2. 1’s Complement Representation
3. 2’s Complement Representation

1. SMR:
Normally a number has two parts sign and magnitude, eg: Consider a number+5. Here + is the
sign and 5 is the magnitude. In SMR the most significant Bit (MSB) is used to represent the sign. If
MSB is 0 sign is +ve and MSB is 1 sign is -ve. eg: If a computer has word size is 1 byte then
Here MSB is used for sign then the remaining 7 bits are used to represent magnitude. So we can ,
represent 27 = 128 numbers. But there are negative and positive numbers. So 128 + 128 = 256
number. The numbers are 0 to +127 and 0 to -127. Here zero is repeated. So we can represent
256 – 1 = 255 numbers.

2. 1’s Complement Representation:


To get the 1’s complement of a binary number, just replace every 0 with 1 and every 1 with 0.
Negative numbers are represented using 1’s complement but +ve number has no 1 ’s
complement,
eg:
(i) To find the 1’s complement of -21
+21 = 00010101
To get the 1’s complement change all 0 to 1 and.all 1 to 0.
-21 = 11101010
1’s complement of-21 is 11101010

(ii) Find the 1’s complement of +21. Positive numbers are represented by using SMR.
+21 = 00010101 (No need to take the 1’s complement)

3. 2’s Complement Representation:


To get the 2’s complement of a binary number, just add 1 to its 1’s complement +ve number has
no 2’s complement.
eg: To find the 2’s complement of -21
+21 = 00010101
First take the 1’s complement for this change all 1 to 0 and all 0 to 1

2’s complement of -21 is 1110 1011

Representation of floating point numbers:


A real number consists of an integer part and fractional part and represent by using Exponent and
Mantissa method. This method is also used to represent too big numbers as well as too small
numbers.
Eg: .0000000000000000000000001 can be represented easily as 1 × 10-25. Here T is the Mantissa
and -25 is the exponent.

A computer with 32 bit word length is used 24 bits for mantissa and the remaining 8 bits used to
store exponent.

Representation of characters:
1. ASCII(American Standard Code for Information Interchange):
It is 7 bits code used to represent alphanumeric and some special characters in computer
memory. It is introduced by U.S. government. Each character in the keyboard has a unique
number.

Eg: ASCII code of ‘a’ is 97, when you press ‘a’ in the keyboard , a signal equivalent to 1100001
(Binary equivalent of 97 is 1100001) is passed to the computer memory. 2 7 = 128, hence we can
represent only 128 characters by using ASCII. It is not enough to represent all the characters of a
standard keyboard.

2. EBCDIC(Extended Binary Coded Decimal Interchange Code):


It is an 8 bit code introduced by IBM(lnternational Business Machine). 2 8 = 256 characters can be
represented by using this.

3. ISCII(lndian Standard Code for Information Interchange):


It uses 8 bits to represent data and introduced by standardization committee and adopted by
Bureau of Indian Standards(BIS).

4. Unicode:
The limitations to store more characters is solved by the introduction of Unicode. It uses 16 bits so
216 = 65536 characters (i.e, world’s all written language characters) can store by using this.

Binary arithmetic:
Binary addition:
The rules for adding two bits

eg: Find the sum of binary numbers 110011 and 100001.

Binary subtraction:
The rules for subtracting a binary digit from another digit.

Subtraction using 1’s complement:


The steps are given below:

Step 1: Add 0s to the left of the subtrahend, to make two numbers with same number of bits.
Step 2: Find 1’s complement of subtrahend.
Step 3: Add the complement with minuend.
Step 4: If there is a carry, ignore the carry, the result is positive then add the carry 1 to the result.
eg: Subtract 1101 from 111100 using 1’s complement method.
Step 1: Insert two Os to the left of 1101. Hence the subtrahend is 001101.
Step 2: 1’s complement of 001101 is 110010
Step 3: Add this to the minuend.

Step 4: Ignore the carry the result is positive and add add the carry 1 to 101110

Hence the result is 101111.

Subtraction using 2’s complement:


The steps are given below :
Step 1: Add 0s to the left of the subtrahend, to make two numbers with same number of bits.
Step 2: Find 2’s complement of subtrahend.
Step 3: Add the complement with minuend.
Step 4: If there is a carry, ignore the carry, the result is positive.
eg: Subtract 1101 from 111100 using 2’s complement method.
Step 1: Insert two 0s to the left of 1101. Hence the subtrahend is 001101.
Step 2: Find the 2’s complement of 001101.
1’s complement is 110010.
2’s complement is 110010 + 1 = 110011
Step 3: Add this to the minuend.

Step 4: Ignore the carry the result is positive. Hence the result is 101111.

You might also like