SlideShare a Scribd company logo
1 of 66
CAP424
COMPUTER APPLICATIONS IN PHARMACY
Number System
Number System is a method of representing Numbers on the Number
Line with the help of a set of Symbols and rules. These symbols range
from 0-9 and are termed as digits. Number System is used to perform
mathematical computations ranging from great scientific calculations to
calculations like counting the number of Toys for a Kid or Number
chocolates remaining in the box. Number Systems comprise of multiple
types based on the base value for its digits.
• Base Value: Decimal Number System: 0-9, (0,1,2,3,4,5,6,7,8,9) = 10
• Base Value: Binary Number System: 0-1, (0,1), F/T, on/off = 2
• Base Value: Octal Number System: 0-7, (0,1,2,3,4,5,6,7) = 8
• Base Value: Hexadecimal Number System: (0-9, A-10, B-11, C-12, D-
13, E-14, F-15) = 16
What is the Number Line?
A Number line is a representation of Numbers with a fixed interval in
between on a straight line. A Number line contains all the types of
numbers like natural numbers, rationals, Integers, etc. Numbers on the
number line increase while moving Left to Right and decrease while
moving from right to left. Ends of a number line are not defined i.e.,
numbers on a number line range from infinity on the left side of the zero
to infinity on the right side of the zero.
Types of Numbers
Numbers are of various types depending upon the patterns of digits that are
used for their creation. Various symbols and rules are also applied on
Numbers which classifies them into a variety of different types:
Types of Number Systems
Based on the base value and the
number of allowed digits, number
systems are of many types. The
four common types of Number
System are:
1. Decimal Number System
2. Binary Number System
3. Octal Number System
4. Hexadecimal Number System
Decimal Number System
Number system with base value 10 is termed as Decimal number system.
It uses 10 digits i.e. 0-9 for the creation of numbers. Here, each digit in the
number is at a specific place with place value a product of different
powers of 10. Here, the place value is termed from right to left as first
place value called units, second to the left as Tens, so on Hundreds,
Thousands, etc. Here, units has the place value as 100, tens has the place
value as 101, hundreds as 102, thousands as 103, and so on.
Units: 100
Tens: 10
For example: 10285 has place values as
(1 × 104) + (0 × 103) + (2 × 102) + (8 × 101) + (5 × 100)
1 × 10000 + 0 × 1000 + 2 × 100 + 8 × 10 + 5 × 1
10000 + 0 + 200 + 80 + 5
10285
Binary Number System
Number System with base value 2 is termed as Binary number system. It
uses 2 digits i.e. 0 and 1 for the creation of numbers. The numbers formed
using these two digits are termed as Binary Numbers. Binary number
system is very useful in electronic devices and computer systems because
it can be easily performed using just two states ON and OFF i.e. 0 and 1.
Decimal Numbers 0-9 are represented in binary as: 0, 1, 10, 11, 100, 101,
110, 111, 1000, and 1001
• 14 can be written as 1110
• 19 can be written as 10011
• 50 can be written as 110010
• 0 = 0 27(10) = -----------(2)
• 1 = 1
• 2 = 1 * 0
• 3 =
• 4 =
• 5 =
• 6 =
• 7 =
• 8 =
• 9 =
Octal Number System
Octal Number System is one in which the base value is 8. It uses 8
digits i.e. 0-7 for creation of Octal Numbers. Octal Numbers can be
converted to Decimal value by multiplying each digit with the place
value and then adding the result. Here the place values are 80, 81, and 82.
Octal Numbers are useful for the representation of UTF8 Numbers.
• (135)10 can be written as (207)8
• (215)10 can be written as (327)8
Hexadecimal Number System
Number System with base value 16 is termed as Hexadecimal Number
System. It uses 16 digits for the creation of its numbers. Digits from 0-9
are taken like the digits in the decimal number system but the digits from
10-15 are represented as A-F i.e. 10 is represented as A, 11 as B, 12 as C,
13 as D, 14 as E, and 15 as F. Hexadecimal Numbers are useful for
handling memory address locations.
• (255)10 can be written as (FF)16
• (1096)10 can be written as (448)16
• (4090)10 can be written as (FFA)16
Conversion of Number Systems
(145)10 = ( )2 = top to bottom
145/2 = 72 / 1 = (10010001)
72/2 = 36 / 0
36/2 = 18 / 0 = bottom to top =(10010001)
18/2 = 9/ 0
9/2 = 4/ 1
4/2 = 2/ 0
2/2 = 1/ 0 = 128 + 16 + 1 = 145
Methods:
145 = 128 64 32 16 8 4 2 1
1 0 0 1 0 0 0 1
Decimal to Binary Conversion
Decimal numbers are represented in base 10, but the binary numbers are of
base 2. Hence, to convert a decimal number to binary number, the base of
that number is to be changed. Follow the steps given below:
• Step 1: Divide the Decimal Number with the base of the number system to
be converted to. Here the conversion is to binary, hence the divisor will be
2.
• Step 2: The remainder obtained from the division will become the least
significant digit of the new number.
• Step 3: The quotient obtained from the division will become the next
dividend and will be divided by base i.e. 2.
• Step 4: The remainder obtained will become the second least significant
digit i.e. it will be added in the left of the previously obtained digit.
Now, the steps 3 and 4 are repeated until the quotient obtained becomes
0, and the remainders obtained after each iteration are added to the left
of the existing digits.
After all the iterations are over, the last obtained remainder will be
termed as the Most Significant digit. 11110011
Decimal to Octal Conversion
Octal Numbers are represented in base 8. Hence, to convert a decimal
number to octal number, the base of that number is to be changed.
Follow the steps given below:
• Step 1: Divide the Decimal Number with the base of the number
system to be converted to. Here the conversion is to octal, hence the
divisor will be 8.
• Step 2: The remainder obtained from the division will become the
least significant digit of the new number.
• Step 3: The quotient obtained from the division will become the next
dividend and will be divided by base i.e. 8.
• Step 4: The remainder obtained will become the second least
significant digit i.e. it will be added in the left of the previously
obtained digit.
Now, the steps 3 and 4 are repeated until the quotient obtained becomes
0, and the remainders obtained after each iteration are added to the left
of the existing digits.
Decimal to Hexadecimal Conversion
Hexadecimal Numbers are represented in base 16. Hence, to convert a
decimal number to hexadecimal number, the base of that number is to be
changed. Follow the steps given below:
• Step 1: Divide the Decimal Number with the base of the number
system to be converted to. Here the conversion is to Hex hence the
divisor will be 16.
• Step 2: The remainder obtained from the division will become the
least significant digit of the new number.
• Step 3: The quotient obtained from the division will become the next
dividend and will be divided by base i.e. 16.
• Step 4: The remainder obtained will become the second least
significant digit i.e. it will be added in the left of the previously
obtained digit.
Now, the steps 3 and 4 are repeated until the quotient obtained becomes 0,
and the remainders obtained after each iteration are added to the left of
the existing digits. (165)10 = ()16
165/16 = 10 / 5 = 10 5 = (A5)16
(1276)10 = ()16 = 4FC
(2784)10 = (101011100000)2 = (5340)8 = (AE0)16
(876)10 = (1101101100)2 = (1554)8 = (36C)16
Conversion from Binary Number System to
Other Number Systems
(101)2 = (5)10
= 1 *
Binary to Decimal Conversion
Binary numbers are represented in base-2, but the decimal numbers are of base-
10. Hence, to convert the binary number into a decimal number, the base of that
number is to be changed. Follow the steps given below:
• Step-1: Multiply each digit of the Binary number with the place value of that
digit, starting from right to left i.e. from LSB to MSB.
• Step-2: Add the result of this multiplication and the decimal number will be
formed.
• (000 111 011 101)2 = (0735)8
• 4+2+1=7
• 011 = 0+2+1=3
101 = 4+0+1=5
Binary to Octal Conversion
Binary numbers are represented in base 2 but the octal numbers are of base
8. Hence, to convert the binary number into octal number, the base of that
number is to be changed. Follow the steps given below:
• Step 1: Divide the binary number into groups of three digits starting from
right to left i.e. from LSB to MSB.
• Step 2: Convert these groups into equivalent octal digits.
• (11110001110)2 = (3616)8
• (110) = 4 + 2 + 0 = 6, 001 = 0+0+1 = 1, 110 = 4+2+0 = 6, 011=0+2+1=3
Binary to Hexadecimal Conversion
Binary numbers are represented in base-2 but the Hexadecimal numbers
are of base 16. Hence, to convert the binary number into Hex number,
the base of that number is to be changed. Follow the steps given below:
• Step 1: Divide the binary number into groups of four digits starting
from right to left i.e. from LSB to MSB.
• Step 2: Convert these groups into equivalent hex digits.
(726)10 = (1011010110)2, (1326 )8, (2D6)16
(10101010111)2 = (2527)8, (1367)10, (557)16
Conversion from Octal Number System to
Other Number Systems
(234)8 = (?)2, (?)10, (?)16
Octal to Decimal Conversion
Octal numbers are represented in base 8, but the decimal numbers are of base
10. Hence, to convert an octal number to a decimal number, the base of that
number is to be changed. Follow the steps given below:
• Step 1: Multiply each digit of the Octal number with the place value of that
digit, starting from right to left i.e. from LSB to MSB.
• Step 2: Add the result of this multiplication and the decimal number will be
formed.
Octal to Binary Conversion
Octal numbers are represented in base 8, but the binary numbers are of
base 2. Hence, to convert an octal number to a binary number, the base
of that number is to be changed. Follow the steps given below:
• Step 1: Write each digit of the octal number separately.
• Step 2: Convert each digit into an equivalent group of three binary
digits.
• Step 3: Combine these groups to form the whole binary number.
(234)8 = (010011100)2
Octal to Hexadecimal Conversion
Octal numbers are represented in base 8, but the hexadecimal numbers are of base 16.
Hence, to convert an octal number to a hex number, the base of that number is to be
changed. Follow the steps given below:
• Step 1: We need to convert the Octal number to Binary first. For that, follow the steps
given in the above conversion.
• Step 2: Now to convert the binary number to Hex number, divide the binary digits into
groups of four digits starting from right to left i.e. from LSB to MSB.
• Step 3: Add zeros prior to MSB to make it a proper group of four digits(if required)
• Step 4: Now convert these groups into their relevant decimal values.
• Step 5: For values from 10-15, convert it into Hex symbols i.e from A-F
(247)8 = (2 4 7)2 = (0000 1010 0111)2 = ( 0 A 7)16 = (0A7)16 = (A7)16
(5456)8 = ( B2E )16
Conversion from Hexadecimal Number System
to Other Number Systems
Hexadecimal to Decimal Conversion
Hexadecimal numbers are represented in base 16 but the decimal
numbers are of base 10. Hence, to convert a hexadecimal number to a
decimal number, the base of that number is to be changed. Follow the
steps given below:
• Step 1: Write the decimal values of the symbols used in the Hex
number i.e. from A-F
• Step 2: Multiply each digit of the Hex number with its place value.
starting from right to left i.e. LSB to MSB.
• Step 3: Add the result of multiplications and the final sum will be the
decimal number.
(AE1)16 = ( 10 * 256 + 14 * 16 + 1 * 1)10
= (2560 + 224 + 1) = 2785
Hexadecimal to Binary Conversion
Hex numbers are represented in base 16, but the binary numbers are of
base 2. Hence, to convert a hexadecimal number to a binary number, the
base of that number is to be changed. Follow the steps given below:
• Step 1: Convert the Hex symbols into its equivalent decimal values.
• Step 2: Write each digit of the Hexadecimal number separately.
• Step 3: Convert each digit into an equivalent group of four binary
digits.
• Step 4: Combine these groups to form the whole binary number.
• (AE1)16 = (10 14 1)2 = (101 011 100 001)2 = (5341)8
Hexadecimal to Octal Conversion
Hexadecimal numbers are represented in base 16, but the octal numbers
are of base 8. Hence, to convert a hex number to an octal number, the
base of that number is to be changed. Follow the steps given below:
• Step 1: We need to convert the Hexadecimal number to Binary first.
For that, follow the steps given in the above conversion.
• Step 2: Now to convert the binary number to Octal number, divide the
binary digits into groups of three digits starting from right to left i.e.
from LSB to MSB.
• Step 3: Add zeros prior to MSB to make it a proper group of three
digits(if required)
• Step 4: Now convert these groups into their relevant decimal values.
What is Binary Addition?
The binary addition operation works similarly to the base 10 decimal
system, except that it is a base 2 system. The binary system consists of
only two digits, 1 and 0. Most of the functionalities of the computer
system use the binary number system. The binary code uses the digits 1’s
and 0’s to make certain processes turn off or on. The process of the
addition operation is very familiar to the decimal system by adjusting to
the base 2.
Before attempting the binary addition process, we should have complete
knowledge of how the place works in the binary number system. Because
most of the modern digital computers and electronic circuits perform
the binary operation by representing each bit as a voltage signal. The bit 0
represents the “OFF” state, and the bit 1 represents the “ON” state.
Rules of Binary Addition
Binary addition is much easier than the decimal addition when you
remember the following tricks or rules. Using these rules, any binary
number can be easily added. The four rules of binary addition are:
• 0 + 0 = 0
• 0 + 1 = 1
• 1 + 0 = 1
• 1 + 1 =10
How To Do Binary Addition?
Example of the binary addition:101 + 101
• Procedure for Binary Addition of Numbers:
101
(+) 101
Step 1: First consider the 1’s column, and add the one’s column,( 1+1 ) and it gives
the result 10 as per the condition of binary addition.
Step 2: Now, leave the 0 in the one’s column and carry the value 1 to the 10’s
column.
1
1 0 1
(+) 1 0 1
---------------
0
Step 3: Now add 10’s place, 1+( 0 + 0 ) = 1. So, nothing carries to the 100’s place
and leave the value 1 in the 10’s place
1
1 0 1
(+) 1 0 1
---------------
1 0
Step 4: Now add the 100’s place ( 1 + 1 ) = 10. Leave the value 0 in the 100’s place
and carries 1 to the 1000’s place.
1
1 0 1
(+) 1 0 1
---------------
1 0 1 0
So, the resultant of the addition operation is 10110 + 10101 =?.
When you cross-check the binary value with the decimal value, the
resultant value should be the same.
The binary value 101 is equal to the decimal value 5
So, 5 + 5 = 10
The decimal number 10 is equal to the binary number 1010.
Examples of Binary Addition
Example 1: 10001 + 11101 = 101110
Example 2: 10111 + 110001 = 1001000
• Binary Addition
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 0 carry 1
• Binary subtraction
• 0 - 0 = 0
• 0 – 1 = 1 borrow 1
• 1 – 0 = 1
• 1 – 1 = 0 // 1110010 = 2+16+32+64 =114
***************************************
• 1010111 – 0011011 = 1011100 (87 – 27 = 60)
• 1010111 + 0011011 = 1110010 (87 + 27 = 114)
What is Binary Subtraction?
Can you subtract binary numbers? The answer is yes. Subtraction of
binary numbers is an arithmetic operation similar to the subtraction of
decimal numbers or base 10 numbers. For example, 1 + 1 + 1 = 3 in
base 10 and 1 + 1 + 1 = 11 in binary number system. When you add and
subtract binary numbers, you will need to be careful when borrowing as
these will take place more often.
When you subtract several columns of binary digits, you must take into
account the borrowing. When 1 is to be subtracted from 0, the result is 1
where 1 is borrowed from the next highest order bit or digit.
Binary Subtraction Rules
Rules and tricks: Binary subtraction is much easier than the decimal
subtraction when you remember the following rules:
0 – 0 = 0
0 – 1 = 1 ( with a borrow of 1)
1 – 0 = 1
1 – 1 = 0
Now, look at the example of the binary subtraction: 101 from 1010
Procedure to do Binary Subtraction
1 0 1 0
(-) 0 1 0 1
Step 1: First consider the 1’s column, and subtract the one’s column,( 0 – 1 ) and it gives the
result 1 as per the condition of binary subtraction with a borrow of 1 from the 10’s place.
Step 2: After borrowed 1 from the 10’s column, the value 1 in the 10’s column is changed
into the value 0.
1 Borrow
1 0 1 0
(-) 1 0 1
---------------------
1
Step 3: So, subtract the value in the 10’s place, ( 0 – 0 ) = 0.
1 Borrow
1 0 1 0
(-) 1 0 1
--------------------
0 1
Step 4: Now subtract the values in 100’s place. Borrow 1 from the 1000’s place ( 0
– 1 ) = 1.
1 1 Borrow
1 0 1 0
(-) 1 0 1
-----------------------
0 1 0 1
So, the resultant of the subtraction operation is 0101.
When you cross-check the binary subtraction resultant value with the
decimal value, the resultant value should be the same.
The binary value 1010 is equal to the decimal value 10, and 101 is
equivalent to 5
So, 10 – 5 = 5
Therefore, the decimal number 5 is equal to the binary number 0101.
Binary Subtraction Examples
Example 1: 0011010 – 001100 = 0 0 0 1 1 1 0
Example 2: 0100010 – 0001010 = 0 0 1 1 0 0 0
Binary Subtraction Using 1’s Complement
• The number 0 represents the positive sign
• The number 1 represents the negative sign
Procedures for Binary Subtraction by 1’s Complement:
• Write the 1’s complement of the subtrahend
• Then add the 1’s complement subtrahend with the minuend
• If the result has a carryover, then add that carry over in the least
significant bit
• If there is no carryover, then take the 1’s complement of the resultant,
and it is negative.
Binary Subtraction Example Using 1’s Complement
Question: (110101)2 – (100101)2
(1 1 0 1 0 1)2 = 5310
(1 0 0 1 0 1)2 = 3710 – subtrahend
Now take the 1’s complement of the subtrahend and add with minuend.
1 carry
1 1 0 1 0 1
(+) 0 1 1 0 1 0
-------------------------
0 0 1 1 1 1
0 0 1 1 1 1
1 carry
------------------
0 1 0 0 0 0
Therefore, the solution is 010000
(010000)2 = 1610
Practice Question: (101011)2 – (111001)2
What is Binary Multiplication?
The binary multiplication operation is actually a process of addition and
shifting operation. This process has to be continued until all the
multiplier is done, and finally, the addition operation is made.
Similar to the decimal system, the multiplication of the binary numbers
is done by multiplying the multiplicand with the multiplier. It is noted
that the multiplication by zero makes all the bits zero, and this step may
be ignored in the intermediate steps. The multiplication by 1 makes all
the multiplicand value unchanged.
Binary Multiplication Rules
Binary multiplication, like other binary operation, is much easier, unlike the
decimal multiplication when you remember the following multiplication
rules. The rules of binary multiplication are:
• 0 × 0 = 0
• 0 × 1 = 0
• 1 × 0 = 0
• 1 × 1 = 1 [No borrow or carry method is applicable here]
As per these rules, it very clear, that if the binary multiplication includes 0,
then it will result in zero itself. Hence,
• Binary product of 0 and 0 is equal to 0
• Binary product of 0 and 1 is equal to 0
• Binary product of 1 and 0 is equal to 0
• Binary product of 1 and 1 is equal to 1
Examples of Binary Multiplication
Example 1: Solve 1010 × 101 = ?
1 0 1 0
(×) 1 0 1
--------------------------
1 0 1 0
0 0 0 0
--------------------------
0 1 0 1 0 ……. First Intermediate Sum
1 0 1 0
--------------------------
1 1 0 0 1 0
Question: 1011.01 × 110.1
What is Binary Division?
The binary division operation is similar to the base 10 decimal system,
except the base 2. The division is probably one of the most challenging
operations of the basic arithmetic operations. There are different ways to
solve division problems using binary operations. Long division is one of
them and the easiest and the most efficient way. This section has been
designed to answer questions about binary division, including:
• What is Binary division?
• Procedure to add two binary numbers
• Examples to Solve Binary division
Binary Division Rules
The binary division is much easier than the decimal division when you
remember the following division rules. The main rules of the binary
division include:
• 1÷1 = 1
• 1÷0 = Meaningless
• 0÷1 = 0
• 0÷0 = Meaningless
Binary Division Examples
Question: Solve 01111100 ÷ 0010
Here the dividend is 01111100, and the divisor is 0010
Remove the zero’s in the Most Significant Bit in both the dividend and
divisor, that doesn’t change the value of the number.
So the dividend becomes 1111100, and the divisor becomes 10.
Now, use the long division method.
Step 1: First, look at the first two numbers in the dividend and compare
with the divisor. Add the number 1 in the quotient place. Then subtract
the value, you get 1 as remainder.
Step 2: Then bring down the next number from the dividend portion and
do the step 1 process again
Step 3: Repeat the process until the remainder becomes zero by
comparing the dividend and the divisor value.
Step 4: Now, in this case, after you get the remainder value as 0, you
have zero left in the dividend portion, so bring that zero to the quotient
portion.
Therefore, the resultant value is quotient value which is equal to 111110
So, 01111100 ÷ 0010 = 111110
Example 2: Solve using the long division method: 101101 ÷ 101

More Related Content

What's hot (20)

Number system
Number systemNumber system
Number system
 
Number System
Number SystemNumber System
Number System
 
Number system and its conversions
Number system and its conversionsNumber system and its conversions
Number system and its conversions
 
Number System
Number SystemNumber System
Number System
 
binary number system
 binary number system binary number system
binary number system
 
Number system
Number systemNumber system
Number system
 
Conversion of number system with base concept
Conversion of number system with base conceptConversion of number system with base concept
Conversion of number system with base concept
 
Decimal, Binary, Octal, And Hexadecimal number systems.
Decimal, Binary, Octal, And Hexadecimal number systems.Decimal, Binary, Octal, And Hexadecimal number systems.
Decimal, Binary, Octal, And Hexadecimal number systems.
 
1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM
 
Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1
 
Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
1's and 2's complement
1's and 2's complement 1's and 2's complement
1's and 2's complement
 
Number System
Number SystemNumber System
Number System
 
Number system.pdf
Number system.pdfNumber system.pdf
Number system.pdf
 
Number System
Number SystemNumber System
Number System
 
11 octal number system
11   octal number system11   octal number system
11 octal number system
 
Number Systems and Binary Aritmetics
Number Systems and Binary AritmeticsNumber Systems and Binary Aritmetics
Number Systems and Binary Aritmetics
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Decimal number system
Decimal number systemDecimal number system
Decimal number system
 
Basic of number system
Basic of number systemBasic of number system
Basic of number system
 

Similar to Number System.pptx

numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdfAsthaChaurasia4
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxMamataAnilgod
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversionRam Pratap Singh
 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptxHamnaKhalid25
 
02 number systems
02 number systems02 number systems
02 number systemsjohn01383
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...Arti Parab Academics
 
Cse 112 number system-[id_142-15-3472]
Cse 112 number system-[id_142-15-3472]Cse 112 number system-[id_142-15-3472]
Cse 112 number system-[id_142-15-3472]Jumaed
 
1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptxLibanMohamed26
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversionsSusantha Herath
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawabAmmar_n
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionMubashir Ali
 
Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02muhammadsarab
 

Similar to Number System.pptx (20)

numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdf
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversion
 
Ch 4
Ch 4Ch 4
Ch 4
 
NUMBER SYSTEM.pptx
NUMBER  SYSTEM.pptxNUMBER  SYSTEM.pptx
NUMBER SYSTEM.pptx
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
 
02 number systems
02 number systems02 number systems
02 number systems
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
 
Cse 112 number system-[id_142-15-3472]
Cse 112 number system-[id_142-15-3472]Cse 112 number system-[id_142-15-3472]
Cse 112 number system-[id_142-15-3472]
 
Number system
Number systemNumber system
Number system
 
5a data representation
5a   data representation5a   data representation
5a data representation
 
Number systems
Number systemsNumber systems
Number systems
 
1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx
 
DCF QNA edited
DCF QNA editedDCF QNA edited
DCF QNA edited
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & Conversion
 
Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02
 

More from Lovely Professional University

The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageLovely Professional University
 

More from Lovely Professional University (20)

The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup language
 
Working with JSON
Working with JSONWorking with JSON
Working with JSON
 
Yargs Module
Yargs ModuleYargs Module
Yargs Module
 
NODEMON Module
NODEMON ModuleNODEMON Module
NODEMON Module
 
Getting Input from User
Getting Input from UserGetting Input from User
Getting Input from User
 
fs Module.pptx
fs Module.pptxfs Module.pptx
fs Module.pptx
 
Transaction Processing in DBMS.pptx
Transaction Processing in DBMS.pptxTransaction Processing in DBMS.pptx
Transaction Processing in DBMS.pptx
 
web_server_browser.ppt
web_server_browser.pptweb_server_browser.ppt
web_server_browser.ppt
 
Web Server.pptx
Web Server.pptxWeb Server.pptx
Web Server.pptx
 
Programming Language.ppt
Programming Language.pptProgramming Language.ppt
Programming Language.ppt
 
Information System.pptx
Information System.pptxInformation System.pptx
Information System.pptx
 
Applications of Computer Science in Pharmacy-1.pptx
Applications of Computer Science in Pharmacy-1.pptxApplications of Computer Science in Pharmacy-1.pptx
Applications of Computer Science in Pharmacy-1.pptx
 
Application of Computers in Pharmacy.pptx
Application of Computers in Pharmacy.pptxApplication of Computers in Pharmacy.pptx
Application of Computers in Pharmacy.pptx
 
Deploying your app.pptx
Deploying your app.pptxDeploying your app.pptx
Deploying your app.pptx
 
Setting up github and ssh keys.ppt
Setting up github and ssh keys.pptSetting up github and ssh keys.ppt
Setting up github and ssh keys.ppt
 
Adding a New Feature and Deploying.ppt
Adding a New Feature and Deploying.pptAdding a New Feature and Deploying.ppt
Adding a New Feature and Deploying.ppt
 
Requiring your own files.pptx
Requiring your own files.pptxRequiring your own files.pptx
Requiring your own files.pptx
 
Unit-2 Getting Input from User.pptx
Unit-2 Getting Input from User.pptxUnit-2 Getting Input from User.pptx
Unit-2 Getting Input from User.pptx
 
Yargs Module.pptx
Yargs Module.pptxYargs Module.pptx
Yargs Module.pptx
 
Working with JSON.pptx
Working with JSON.pptxWorking with JSON.pptx
Working with JSON.pptx
 

Recently uploaded

Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementDr. Deepak Mudgal
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...ppkakm
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsmeharikiros2
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxhublikarsn
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesRashidFaridChishti
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptAfnanAhmad53
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information SystemsAnge Felix NSANZIYERA
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 

Recently uploaded (20)

Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 

Number System.pptx

  • 2. Number System Number System is a method of representing Numbers on the Number Line with the help of a set of Symbols and rules. These symbols range from 0-9 and are termed as digits. Number System is used to perform mathematical computations ranging from great scientific calculations to calculations like counting the number of Toys for a Kid or Number chocolates remaining in the box. Number Systems comprise of multiple types based on the base value for its digits. • Base Value: Decimal Number System: 0-9, (0,1,2,3,4,5,6,7,8,9) = 10 • Base Value: Binary Number System: 0-1, (0,1), F/T, on/off = 2 • Base Value: Octal Number System: 0-7, (0,1,2,3,4,5,6,7) = 8 • Base Value: Hexadecimal Number System: (0-9, A-10, B-11, C-12, D- 13, E-14, F-15) = 16
  • 3. What is the Number Line? A Number line is a representation of Numbers with a fixed interval in between on a straight line. A Number line contains all the types of numbers like natural numbers, rationals, Integers, etc. Numbers on the number line increase while moving Left to Right and decrease while moving from right to left. Ends of a number line are not defined i.e., numbers on a number line range from infinity on the left side of the zero to infinity on the right side of the zero.
  • 4. Types of Numbers Numbers are of various types depending upon the patterns of digits that are used for their creation. Various symbols and rules are also applied on Numbers which classifies them into a variety of different types:
  • 5. Types of Number Systems Based on the base value and the number of allowed digits, number systems are of many types. The four common types of Number System are: 1. Decimal Number System 2. Binary Number System 3. Octal Number System 4. Hexadecimal Number System
  • 6. Decimal Number System Number system with base value 10 is termed as Decimal number system. It uses 10 digits i.e. 0-9 for the creation of numbers. Here, each digit in the number is at a specific place with place value a product of different powers of 10. Here, the place value is termed from right to left as first place value called units, second to the left as Tens, so on Hundreds, Thousands, etc. Here, units has the place value as 100, tens has the place value as 101, hundreds as 102, thousands as 103, and so on. Units: 100 Tens: 10
  • 7. For example: 10285 has place values as (1 × 104) + (0 × 103) + (2 × 102) + (8 × 101) + (5 × 100) 1 × 10000 + 0 × 1000 + 2 × 100 + 8 × 10 + 5 × 1 10000 + 0 + 200 + 80 + 5 10285
  • 8. Binary Number System Number System with base value 2 is termed as Binary number system. It uses 2 digits i.e. 0 and 1 for the creation of numbers. The numbers formed using these two digits are termed as Binary Numbers. Binary number system is very useful in electronic devices and computer systems because it can be easily performed using just two states ON and OFF i.e. 0 and 1. Decimal Numbers 0-9 are represented in binary as: 0, 1, 10, 11, 100, 101, 110, 111, 1000, and 1001 • 14 can be written as 1110 • 19 can be written as 10011 • 50 can be written as 110010
  • 9. • 0 = 0 27(10) = -----------(2) • 1 = 1 • 2 = 1 * 0 • 3 = • 4 = • 5 = • 6 = • 7 = • 8 = • 9 =
  • 10. Octal Number System Octal Number System is one in which the base value is 8. It uses 8 digits i.e. 0-7 for creation of Octal Numbers. Octal Numbers can be converted to Decimal value by multiplying each digit with the place value and then adding the result. Here the place values are 80, 81, and 82. Octal Numbers are useful for the representation of UTF8 Numbers. • (135)10 can be written as (207)8 • (215)10 can be written as (327)8
  • 11. Hexadecimal Number System Number System with base value 16 is termed as Hexadecimal Number System. It uses 16 digits for the creation of its numbers. Digits from 0-9 are taken like the digits in the decimal number system but the digits from 10-15 are represented as A-F i.e. 10 is represented as A, 11 as B, 12 as C, 13 as D, 14 as E, and 15 as F. Hexadecimal Numbers are useful for handling memory address locations. • (255)10 can be written as (FF)16 • (1096)10 can be written as (448)16 • (4090)10 can be written as (FFA)16
  • 12. Conversion of Number Systems (145)10 = ( )2 = top to bottom 145/2 = 72 / 1 = (10010001) 72/2 = 36 / 0 36/2 = 18 / 0 = bottom to top =(10010001) 18/2 = 9/ 0 9/2 = 4/ 1 4/2 = 2/ 0 2/2 = 1/ 0 = 128 + 16 + 1 = 145 Methods: 145 = 128 64 32 16 8 4 2 1 1 0 0 1 0 0 0 1
  • 13. Decimal to Binary Conversion Decimal numbers are represented in base 10, but the binary numbers are of base 2. Hence, to convert a decimal number to binary number, the base of that number is to be changed. Follow the steps given below: • Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the conversion is to binary, hence the divisor will be 2. • Step 2: The remainder obtained from the division will become the least significant digit of the new number. • Step 3: The quotient obtained from the division will become the next dividend and will be divided by base i.e. 2. • Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the left of the previously obtained digit.
  • 14. Now, the steps 3 and 4 are repeated until the quotient obtained becomes 0, and the remainders obtained after each iteration are added to the left of the existing digits. After all the iterations are over, the last obtained remainder will be termed as the Most Significant digit. 11110011
  • 15. Decimal to Octal Conversion Octal Numbers are represented in base 8. Hence, to convert a decimal number to octal number, the base of that number is to be changed. Follow the steps given below: • Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the conversion is to octal, hence the divisor will be 8. • Step 2: The remainder obtained from the division will become the least significant digit of the new number. • Step 3: The quotient obtained from the division will become the next dividend and will be divided by base i.e. 8. • Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the left of the previously obtained digit.
  • 16. Now, the steps 3 and 4 are repeated until the quotient obtained becomes 0, and the remainders obtained after each iteration are added to the left of the existing digits.
  • 17. Decimal to Hexadecimal Conversion Hexadecimal Numbers are represented in base 16. Hence, to convert a decimal number to hexadecimal number, the base of that number is to be changed. Follow the steps given below: • Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the conversion is to Hex hence the divisor will be 16. • Step 2: The remainder obtained from the division will become the least significant digit of the new number. • Step 3: The quotient obtained from the division will become the next dividend and will be divided by base i.e. 16. • Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the left of the previously obtained digit.
  • 18. Now, the steps 3 and 4 are repeated until the quotient obtained becomes 0, and the remainders obtained after each iteration are added to the left of the existing digits. (165)10 = ()16 165/16 = 10 / 5 = 10 5 = (A5)16 (1276)10 = ()16 = 4FC
  • 19. (2784)10 = (101011100000)2 = (5340)8 = (AE0)16 (876)10 = (1101101100)2 = (1554)8 = (36C)16
  • 20. Conversion from Binary Number System to Other Number Systems (101)2 = (5)10 = 1 *
  • 21. Binary to Decimal Conversion Binary numbers are represented in base-2, but the decimal numbers are of base- 10. Hence, to convert the binary number into a decimal number, the base of that number is to be changed. Follow the steps given below: • Step-1: Multiply each digit of the Binary number with the place value of that digit, starting from right to left i.e. from LSB to MSB. • Step-2: Add the result of this multiplication and the decimal number will be formed. • (000 111 011 101)2 = (0735)8 • 4+2+1=7 • 011 = 0+2+1=3 101 = 4+0+1=5
  • 22.
  • 23. Binary to Octal Conversion Binary numbers are represented in base 2 but the octal numbers are of base 8. Hence, to convert the binary number into octal number, the base of that number is to be changed. Follow the steps given below: • Step 1: Divide the binary number into groups of three digits starting from right to left i.e. from LSB to MSB. • Step 2: Convert these groups into equivalent octal digits. • (11110001110)2 = (3616)8 • (110) = 4 + 2 + 0 = 6, 001 = 0+0+1 = 1, 110 = 4+2+0 = 6, 011=0+2+1=3
  • 24.
  • 25. Binary to Hexadecimal Conversion Binary numbers are represented in base-2 but the Hexadecimal numbers are of base 16. Hence, to convert the binary number into Hex number, the base of that number is to be changed. Follow the steps given below: • Step 1: Divide the binary number into groups of four digits starting from right to left i.e. from LSB to MSB. • Step 2: Convert these groups into equivalent hex digits. (726)10 = (1011010110)2, (1326 )8, (2D6)16 (10101010111)2 = (2527)8, (1367)10, (557)16
  • 26.
  • 27. Conversion from Octal Number System to Other Number Systems (234)8 = (?)2, (?)10, (?)16
  • 28. Octal to Decimal Conversion Octal numbers are represented in base 8, but the decimal numbers are of base 10. Hence, to convert an octal number to a decimal number, the base of that number is to be changed. Follow the steps given below: • Step 1: Multiply each digit of the Octal number with the place value of that digit, starting from right to left i.e. from LSB to MSB. • Step 2: Add the result of this multiplication and the decimal number will be formed.
  • 29.
  • 30. Octal to Binary Conversion Octal numbers are represented in base 8, but the binary numbers are of base 2. Hence, to convert an octal number to a binary number, the base of that number is to be changed. Follow the steps given below: • Step 1: Write each digit of the octal number separately. • Step 2: Convert each digit into an equivalent group of three binary digits. • Step 3: Combine these groups to form the whole binary number. (234)8 = (010011100)2
  • 31.
  • 32. Octal to Hexadecimal Conversion Octal numbers are represented in base 8, but the hexadecimal numbers are of base 16. Hence, to convert an octal number to a hex number, the base of that number is to be changed. Follow the steps given below: • Step 1: We need to convert the Octal number to Binary first. For that, follow the steps given in the above conversion. • Step 2: Now to convert the binary number to Hex number, divide the binary digits into groups of four digits starting from right to left i.e. from LSB to MSB. • Step 3: Add zeros prior to MSB to make it a proper group of four digits(if required) • Step 4: Now convert these groups into their relevant decimal values. • Step 5: For values from 10-15, convert it into Hex symbols i.e from A-F (247)8 = (2 4 7)2 = (0000 1010 0111)2 = ( 0 A 7)16 = (0A7)16 = (A7)16 (5456)8 = ( B2E )16
  • 33.
  • 34. Conversion from Hexadecimal Number System to Other Number Systems
  • 35. Hexadecimal to Decimal Conversion Hexadecimal numbers are represented in base 16 but the decimal numbers are of base 10. Hence, to convert a hexadecimal number to a decimal number, the base of that number is to be changed. Follow the steps given below: • Step 1: Write the decimal values of the symbols used in the Hex number i.e. from A-F • Step 2: Multiply each digit of the Hex number with its place value. starting from right to left i.e. LSB to MSB. • Step 3: Add the result of multiplications and the final sum will be the decimal number. (AE1)16 = ( 10 * 256 + 14 * 16 + 1 * 1)10 = (2560 + 224 + 1) = 2785
  • 36.
  • 37. Hexadecimal to Binary Conversion Hex numbers are represented in base 16, but the binary numbers are of base 2. Hence, to convert a hexadecimal number to a binary number, the base of that number is to be changed. Follow the steps given below: • Step 1: Convert the Hex symbols into its equivalent decimal values. • Step 2: Write each digit of the Hexadecimal number separately. • Step 3: Convert each digit into an equivalent group of four binary digits. • Step 4: Combine these groups to form the whole binary number. • (AE1)16 = (10 14 1)2 = (101 011 100 001)2 = (5341)8
  • 38.
  • 39. Hexadecimal to Octal Conversion Hexadecimal numbers are represented in base 16, but the octal numbers are of base 8. Hence, to convert a hex number to an octal number, the base of that number is to be changed. Follow the steps given below: • Step 1: We need to convert the Hexadecimal number to Binary first. For that, follow the steps given in the above conversion. • Step 2: Now to convert the binary number to Octal number, divide the binary digits into groups of three digits starting from right to left i.e. from LSB to MSB. • Step 3: Add zeros prior to MSB to make it a proper group of three digits(if required) • Step 4: Now convert these groups into their relevant decimal values.
  • 40.
  • 41. What is Binary Addition? The binary addition operation works similarly to the base 10 decimal system, except that it is a base 2 system. The binary system consists of only two digits, 1 and 0. Most of the functionalities of the computer system use the binary number system. The binary code uses the digits 1’s and 0’s to make certain processes turn off or on. The process of the addition operation is very familiar to the decimal system by adjusting to the base 2. Before attempting the binary addition process, we should have complete knowledge of how the place works in the binary number system. Because most of the modern digital computers and electronic circuits perform the binary operation by representing each bit as a voltage signal. The bit 0 represents the “OFF” state, and the bit 1 represents the “ON” state.
  • 42. Rules of Binary Addition Binary addition is much easier than the decimal addition when you remember the following tricks or rules. Using these rules, any binary number can be easily added. The four rules of binary addition are: • 0 + 0 = 0 • 0 + 1 = 1 • 1 + 0 = 1 • 1 + 1 =10
  • 43. How To Do Binary Addition? Example of the binary addition:101 + 101 • Procedure for Binary Addition of Numbers: 101 (+) 101 Step 1: First consider the 1’s column, and add the one’s column,( 1+1 ) and it gives the result 10 as per the condition of binary addition. Step 2: Now, leave the 0 in the one’s column and carry the value 1 to the 10’s column. 1 1 0 1 (+) 1 0 1 --------------- 0
  • 44. Step 3: Now add 10’s place, 1+( 0 + 0 ) = 1. So, nothing carries to the 100’s place and leave the value 1 in the 10’s place 1 1 0 1 (+) 1 0 1 --------------- 1 0 Step 4: Now add the 100’s place ( 1 + 1 ) = 10. Leave the value 0 in the 100’s place and carries 1 to the 1000’s place. 1 1 0 1 (+) 1 0 1 --------------- 1 0 1 0 So, the resultant of the addition operation is 10110 + 10101 =?.
  • 45. When you cross-check the binary value with the decimal value, the resultant value should be the same. The binary value 101 is equal to the decimal value 5 So, 5 + 5 = 10 The decimal number 10 is equal to the binary number 1010.
  • 46. Examples of Binary Addition Example 1: 10001 + 11101 = 101110 Example 2: 10111 + 110001 = 1001000
  • 47. • Binary Addition 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 0 carry 1 • Binary subtraction • 0 - 0 = 0 • 0 – 1 = 1 borrow 1 • 1 – 0 = 1 • 1 – 1 = 0 // 1110010 = 2+16+32+64 =114 *************************************** • 1010111 – 0011011 = 1011100 (87 – 27 = 60) • 1010111 + 0011011 = 1110010 (87 + 27 = 114)
  • 48. What is Binary Subtraction? Can you subtract binary numbers? The answer is yes. Subtraction of binary numbers is an arithmetic operation similar to the subtraction of decimal numbers or base 10 numbers. For example, 1 + 1 + 1 = 3 in base 10 and 1 + 1 + 1 = 11 in binary number system. When you add and subtract binary numbers, you will need to be careful when borrowing as these will take place more often. When you subtract several columns of binary digits, you must take into account the borrowing. When 1 is to be subtracted from 0, the result is 1 where 1 is borrowed from the next highest order bit or digit.
  • 49. Binary Subtraction Rules Rules and tricks: Binary subtraction is much easier than the decimal subtraction when you remember the following rules: 0 – 0 = 0 0 – 1 = 1 ( with a borrow of 1) 1 – 0 = 1 1 – 1 = 0 Now, look at the example of the binary subtraction: 101 from 1010
  • 50. Procedure to do Binary Subtraction 1 0 1 0 (-) 0 1 0 1 Step 1: First consider the 1’s column, and subtract the one’s column,( 0 – 1 ) and it gives the result 1 as per the condition of binary subtraction with a borrow of 1 from the 10’s place. Step 2: After borrowed 1 from the 10’s column, the value 1 in the 10’s column is changed into the value 0. 1 Borrow 1 0 1 0 (-) 1 0 1 --------------------- 1
  • 51. Step 3: So, subtract the value in the 10’s place, ( 0 – 0 ) = 0. 1 Borrow 1 0 1 0 (-) 1 0 1 -------------------- 0 1 Step 4: Now subtract the values in 100’s place. Borrow 1 from the 1000’s place ( 0 – 1 ) = 1. 1 1 Borrow 1 0 1 0 (-) 1 0 1 ----------------------- 0 1 0 1 So, the resultant of the subtraction operation is 0101.
  • 52. When you cross-check the binary subtraction resultant value with the decimal value, the resultant value should be the same. The binary value 1010 is equal to the decimal value 10, and 101 is equivalent to 5 So, 10 – 5 = 5 Therefore, the decimal number 5 is equal to the binary number 0101.
  • 53. Binary Subtraction Examples Example 1: 0011010 – 001100 = 0 0 0 1 1 1 0 Example 2: 0100010 – 0001010 = 0 0 1 1 0 0 0
  • 54. Binary Subtraction Using 1’s Complement • The number 0 represents the positive sign • The number 1 represents the negative sign Procedures for Binary Subtraction by 1’s Complement: • Write the 1’s complement of the subtrahend • Then add the 1’s complement subtrahend with the minuend • If the result has a carryover, then add that carry over in the least significant bit • If there is no carryover, then take the 1’s complement of the resultant, and it is negative.
  • 55. Binary Subtraction Example Using 1’s Complement Question: (110101)2 – (100101)2 (1 1 0 1 0 1)2 = 5310 (1 0 0 1 0 1)2 = 3710 – subtrahend Now take the 1’s complement of the subtrahend and add with minuend. 1 carry 1 1 0 1 0 1 (+) 0 1 1 0 1 0 ------------------------- 0 0 1 1 1 1
  • 56. 0 0 1 1 1 1 1 carry ------------------ 0 1 0 0 0 0 Therefore, the solution is 010000 (010000)2 = 1610 Practice Question: (101011)2 – (111001)2
  • 57. What is Binary Multiplication? The binary multiplication operation is actually a process of addition and shifting operation. This process has to be continued until all the multiplier is done, and finally, the addition operation is made. Similar to the decimal system, the multiplication of the binary numbers is done by multiplying the multiplicand with the multiplier. It is noted that the multiplication by zero makes all the bits zero, and this step may be ignored in the intermediate steps. The multiplication by 1 makes all the multiplicand value unchanged.
  • 58. Binary Multiplication Rules Binary multiplication, like other binary operation, is much easier, unlike the decimal multiplication when you remember the following multiplication rules. The rules of binary multiplication are: • 0 × 0 = 0 • 0 × 1 = 0 • 1 × 0 = 0 • 1 × 1 = 1 [No borrow or carry method is applicable here] As per these rules, it very clear, that if the binary multiplication includes 0, then it will result in zero itself. Hence, • Binary product of 0 and 0 is equal to 0 • Binary product of 0 and 1 is equal to 0 • Binary product of 1 and 0 is equal to 0 • Binary product of 1 and 1 is equal to 1
  • 59. Examples of Binary Multiplication Example 1: Solve 1010 × 101 = ? 1 0 1 0 (×) 1 0 1 -------------------------- 1 0 1 0 0 0 0 0 -------------------------- 0 1 0 1 0 ……. First Intermediate Sum 1 0 1 0 -------------------------- 1 1 0 0 1 0
  • 61. What is Binary Division? The binary division operation is similar to the base 10 decimal system, except the base 2. The division is probably one of the most challenging operations of the basic arithmetic operations. There are different ways to solve division problems using binary operations. Long division is one of them and the easiest and the most efficient way. This section has been designed to answer questions about binary division, including: • What is Binary division? • Procedure to add two binary numbers • Examples to Solve Binary division
  • 62. Binary Division Rules The binary division is much easier than the decimal division when you remember the following division rules. The main rules of the binary division include: • 1÷1 = 1 • 1÷0 = Meaningless • 0÷1 = 0 • 0÷0 = Meaningless
  • 63. Binary Division Examples Question: Solve 01111100 ÷ 0010 Here the dividend is 01111100, and the divisor is 0010 Remove the zero’s in the Most Significant Bit in both the dividend and divisor, that doesn’t change the value of the number. So the dividend becomes 1111100, and the divisor becomes 10. Now, use the long division method.
  • 64. Step 1: First, look at the first two numbers in the dividend and compare with the divisor. Add the number 1 in the quotient place. Then subtract the value, you get 1 as remainder. Step 2: Then bring down the next number from the dividend portion and do the step 1 process again Step 3: Repeat the process until the remainder becomes zero by comparing the dividend and the divisor value. Step 4: Now, in this case, after you get the remainder value as 0, you have zero left in the dividend portion, so bring that zero to the quotient portion. Therefore, the resultant value is quotient value which is equal to 111110 So, 01111100 ÷ 0010 = 111110
  • 65.
  • 66. Example 2: Solve using the long division method: 101101 ÷ 101