0% found this document useful (0 votes)
138 views8 pages

Lab Manual: Flow Chart & Number System

This lab manual document provides instructions for converting between different number systems: binary, decimal, octal, and hexadecimal. It includes 5 questions with examples of converting specific numbers between the different systems. For example, it shows how to convert the hexadecimal number 95FF4 to binary, octal, and decimal. It also includes a flow chart and algorithm for calculating the average of 3 numbers.

Uploaded by

topology kamal
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)
138 views8 pages

Lab Manual: Flow Chart & Number System

This lab manual document provides instructions for converting between different number systems: binary, decimal, octal, and hexadecimal. It includes 5 questions with examples of converting specific numbers between the different systems. For example, it shows how to convert the hexadecimal number 95FF4 to binary, octal, and decimal. It also includes a flow chart and algorithm for calculating the average of 3 numbers.

Uploaded by

topology kamal
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/ 8

LAB MANUAL

Flow chart & Number system

SUBMITTED TO : MS. FATIMA SHEHZADI

SUBMITTED BY : SYED ASIF SHAH


Reg no: 2020-CIV-330

1. Convert the Hexadecimal number 95FF4 to Binary, Octal, and decimal number system.

Hexadecimal number 95FF4 to Binary number system:


SOLUTION:
(95FF4)16 = (________)2
9=1001
5=0101
F=1111
F=1111
4=0100
Hence (95FF4)16= (10010101111111110100)2

Hexadecimal number 95FF4 to Octal:

First we convert (95FF4)16 into binary number system


(95FF4)16 =(________)2

9=1001
5=0101
F=1111
F=1111
4=0100
Hence (95FF4)16= (10010101111111110100)2
Now (10010101111111110100)2 will convert to Octa number system
(10010101111111110100)2 = (_________)8
010|010 | 101 | 111 | 111 | 110 | 100
↓ ↓ ↓ ↓ ↓ ↓ ↓
2 2 5 7 7 6 4
(10010101111111110100)2 = ( 2257767)8
Hence (95FF4)16 = ( 2257767)8

Hexadecimal number 95FF4 to decimal number system:


(95FF4)16 = 9 * 164+ 5 * 163+ 15 * 162+ 15 * 161+ 4* 160
= 9 * 65536+ 5 * 4096 + 15 * 256 + 15 * 16 + 4 * 1
= 589824 + 20480 + 3840 + 240 + 4
= (614388) 10
Hence (95FF4)16 = (614388)10
2. Convert the Decimal number 05953 to Binary, Octal and Hexadecimal number system.

Decimal number 05953 to Binary number system

Division Remainder
by 2 Quotient (Digit)
(05953)/2 2976 1
(2976)/2 1488 0
(1488)/2 744 0
(744)/2 372 0
(372)/2 186 0
(186)/2 93 0
(93)/2 46 1
(46)/2 23 0
(23)/2 11 1
(11)/2 5 1
(5)/2 2 1
(2)/2 1 0
(1)/2 0 1
Hence (05953)10
=(1011101000001)2

Decimal number 05953 to Octal number system:

Division Remainder
by 8 Quotient (Digit)
(05953)/8 744 1
744/8 93 0
93/8 11 5
11/8 1 3
1/8 0 1
Hence (05953)10 = (13501)8

Decimal number 05953 Hexadecimal number system:

Division Quotient Remainder


by 16 (Digit)
5953/16 372 1
372/16 23 4
23/16 1 7
1/16 0 1

Hence (05953)10 = (1741)16

3. Convert the Octal number 75431 to Binary, Decimal and Hexadecimal number system

Octal number 75431 to Binary number system:

• Highest symbol is 7
• 7 in Binary is 111
• Therefore, each digit is breaking down to 3 bits.
• Conversion is achieved by breaking digit into 3 bits, starting from the Right side, and
finding the Binary equivalent

(75431)8 = (__________)2

7 = 111
5 = 101
4 = 100
3 = 011
1 = 001

Hence (75431)8 = (111101100011001)2

Octal number 75431 to Decimal number system:

(75431)8 = (__________)10

(75431)8 = (7*84) + (5*83) + (4*82) + (3*81) + (1*80)


(75431)8 = (7*4096) + (5*512) + (4*64) + (3*8) + (1*1)

(75431)8 = 28672+2560+256+24+1

(75431)8 = 31513

Hence (75431)8 = (31513)10

Octal number 75431 to Hexadecimal number system :


(75431)8 = (______) 16

 Step 1 convert octal into binary number

(75431)8 = (______) 2

7 =111
5 =101
4 =100
3 =011
1 =001

(75431)8 = (111101100011001)2

 Step 2 convert binary into hexadecimal

(111101100011001)2 = (_______) 16

From right divide them into groups of 4 digits

0111, 1011, 0001, 1001

0111=7, 1011=11=B, 0001=1, 1001=9

Hence (111101100011001)2 = (7B19)16

4. Convert the Binary number 101100101101 to Octal, Decimal and Hexadecimal number System:

 Binary to Octal Conversion

• Highest symbol is 7
• 7 in Binary is 111
• Therefore, the largest Binary grouping in octal consists of 3 bits.
• Conversion is achieved by breaking Binary into groups of 3 bits, starting from the Right side, and
finding the Octal equivalent.
(101100101101)2 = (_________)8

101 | 100 | 101 | 101


↓ ↓ ↓ ↓
5 4 5 5
Hence: (101100101101)2 = (5455)8

 Binary to Decimal Conversion

(101100101101)2 = (______) 10

(101100101101)2 = 1x211+0x210+1x29+1x28+0x27+0x26+1x25+0x24+1x23+1x22+0x21+1x20

= 2040+512+256+32+8+4+2
= (2854) 10

 Binary to Hexadecimal Conversion

(101100101101)2 = (______) 16
1. From right divide them into groups of four digits as in hexadecimal l number system highest symbol is
15
2. 15 in binary is 1111

= 1011, 0010, 1101

Convert into hexadecimal number system

1011=B, 0010=2, 1101=D

(101100101101)2 = (B2D) 16

Q#5 Draw a flow chart to find the average of any three numbers.
 Let three numbers are 1, 2, 3.

 The average of these no’s is as follow:

 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 = 1+2+3 / 3 = 2

 The flow chart of the average of these three numbers is show below:
Start

Input No’s
1,2,3

Average=
1+2+3 / 3 = 2

Output Avg.

End

Q#6 Write the algorithm to find the average of any three numbers.

 Step 1: Start

 Step 2: Read the three number suppose "1","2","3".

 Step 3: Sum= 1+2+3;


 Step 4: Avg= Sum/3

 Step 5: Display/Print "sum " and "Avg".

 Step 6: End.

THANK YOU

You might also like