This topic is useful for KTU Regulation 2019 1. EET206 Digital Electronics ( ELECTRICAL AND ELECTRONICS ENGINEERING) 2. CST203 Logic System Design ( COMPUTER SCIENCE ENGINEERING) 3. ECT203 Logic Circuit Design (ELECTRONICS AND COMMUNICATION ENGINEERING) 4. EBT205 Logic Circuit and Design (BIOMEDICAL ENGINEERING) 5. ITT203 Logic System Design (INFORMATION TECHNOLOGY) 6. ECT203 Logic Circuit Design (APPLIED ELECTRONICS ENGINEERING) KTU Regulation 2015 1. EE204 Digital Electronics and Logic Design (ELECTRICAL AND ELECTRONICS ENGINEERING) 2. CS203 Switching Theory and Logic Design (COMPUTER SCIENCE ENGINEERING) 3. EC207 Logic Circuit Design (ELECTRONICS AND COMMUNICATION ENGINEERING) 4. EC207 Logic Circuit Design (APPLIED ELECTRONICS ENGINEERING AND INSTRUMENTATION) 5. IC207 Design of Logic Circuit (BIOMEDICAL ENGINEERING) FOR FULL CLASSES : https://youtube.com/playlist?list=PL2UV2EJdMQmgLuA8dwLY7-4DsbNQTsUOg #digitalelectronics#ktu#eee#electrical#cse FOR FULL CLASSES : https://youtube.com/playlist?list=PL2UV2EJdMQmgLuA8dwLY7-4DsbNQTsUOg
Hello students, today we are going to discuss about number system conversion
especially binary to octal conversion.
We have discussed about introduction of number system in the last class.
If you haven't watched that class, you can check the link in the description box.
Today we are going to discuss about how to convert binary number to octal number.
There are two bases of binary number.
If it is octal number, the base is 8.
In binary, we can represent only 0s and 1s.
In octal number, we can represent any value from 0 to 7.
My question is, what is the power of 2 to get 8?
2 to the power of 3.
2 cubed is equal to 8.
We have studied in our childhood class.
We know that 2 cubed is 8.
Now we have to form a chart of octal number.
We have to form a chart of octal number in the form of 3 columns and 8 rows.
In that, we have represented the value of octal number from 0 to 7.
Now we have to represent the binary value corresponding to 0.
For that, we have studied that 2 cubed is equal to 8.
Now we have to divide 8 by 2.
8 by 2 is equal to 4.
In the first column, we have to represent the first 4 rows.
We have to represent 0s.
0, 0, 0, 0.
For the next 4 rows, we have to represent 1.
1, 1, 1, 1.
These are the cases in the first column.
Now we are going to the second column.
In the second column, we have to divide 4 by 2.
4 by 2 is equal to 2.
In the second column, we have to represent the first 2 rows.
We have to represent 0.
For the first 2 rows, we have to represent 1.
We have to alternate 0, 0, 1, 1.
Now we are going to the third column.
In the third column, we have to divide 2 by 2.
2 by 2 is equal to 1.
We have to alternate 0s and 1s in the third column.
0, 1, 0, 1, 0, 1.
These are the corresponding binary values of the octal.
There is another method to by heart this table.
In a 3-bit form, we have to write 4, 2, 1.
We have to find the corresponding binary value of 2.
We have to find where 2 is.
Under the corresponding number, we have to write 1.
Under the corresponding number, we have to write 0.
0, 1, 0.
These are the binary values of 2.
Let us check the table.
0, 1, 0.
It is 2, right?
If it is 3,
when we count 2 numbers, we get 3.
2 plus 1.
We cannot count 2 and 1.
So, under the corresponding number, we have to write 1.
Under the corresponding number, we have to write 0.
4 plus 2 is 6.
It is not 3.
So, 4 is not needed here.
So, under the corresponding number, we have to write 0.
Then, 2 and 1.
2 plus 1 is 3.
So, under the corresponding number, we have to write 1 and under the corresponding number, we have to write 1.
In this way, we can find it.
The next example is 7.
If it is 7,
when we add any number, we get 7.
4 plus 2 is 6.
6 plus 1 is 7.
We need 3.
So, under the corresponding number, we have to write 1.
1, 1, 1.
The next example is 6.
4 plus 2 is 6.
We need 4 and 2.
So, under the corresponding number, we have to write 0.
We need 4 and 2.
So, under the corresponding number, we have to write 1.
This is another technique.
You can follow whichever technique is comfortable for you.
Now, let us see the problem.
The first question is,
1, 1, 0, 0, 1, 1, 0
to the base 2,
we have to convert it to what?
We have to convert it to octal.
We have to check two things here.
First, we have to check whether there is a decimal.
In this question, we have to check
whether there is a decimal.
No, there is not.
So, we can write the question directly.
1, 1, 0, 0, 1, 1, 0
Check whether there is a decimal.
No, there is not.
If there is not a decimal,
we have to take the case
from the right portion
to the left portion,
we have to group it in the form of 3 bits.
0, 1, 1 is one group.
Next, 0, 0, 1
is the next group.
Here, only 1 is left.
If two numbers are added,
it will become 3 bits.
If there are no values here,
if there is a single value,
we can add zeros to make it 3 bits.
I am adding two zeros here.
When we add two zeros,
this will also become 3 bits.
We can group it in the form of 3 bits.
Now, let us see the values in the chart.
We have given the binary value
corresponding to the octal.
Look at the chart
and write the corresponding values.
The first value is 0, 0, 1.
The value of 0, 0, 1 is 1.
This is in the chart.
Write it below.
The value of 0, 0, 1 is 1.
What is the next value?
1, 0, 0
What is the next value?
4
What is the next value?
1, 1, 0
The value of 1, 1, 0 is 6.
Write 6 below it.
We have got the answer.
146 to the base 8
If you get such a question,
first check if there is a decimal
or a point in it.
If there is no point,
group it in the form of 3 bits
from the extreme right to the left.
Make sure you do not group it in the form of 3 bits.
Let us check the second question.
The second question is
0, 1, 1
0, 0, 1
0, 1, 1 to the base 2
We have to move it to the octal.
We have checked if there is a decimal.
If not,
group it in the form of 3 bits
from the extreme right to the left.
This is one group.
This is the next group.
We have got the answer.
Since there is no point,
we can check the chart.
0, 1, 1
The value of 0, 1, 1 is 3.
Write it below.
0, 1, 1, 3
Next is 0, 0, 1
The value of 0, 0, 1 is 1.
Write it below.
Next is 0, 1, 1
The value of 0, 1, 1 is 3.
Write it below.
What is the answer?
3, 1, 3 to the base 8
0, 1, 1
0, 0, 1
0, 1, 1
What is the octal value of 0, 1, 1?
3, 1, 3 to the base 8
Next question
1, 0, 1, 1
0, 1, 0, 0
to the base 8
Group it in the form of 3 bits
from the extreme right to the left.
This is one group.
This is the next group.
There is a missing value here.
We have to compensate with 0.
0, 1, 0
We wrote that group there.
Next is 1, 1, 0
1, 1, 0
Next is 1, 0, 0
We wrote that group there.
Let's go to the chart.
The value of 0, 1, 0 is 2.
Write it below.
Next is 1, 1, 0
The value of 1, 1, 0
is 6.
Next is 1, 0, 0
The value of 1, 0, 0 is 4.
What is the answer?
2, 64
to the base 8
1, 0
1, 1
0, 1, 0, 0
to the base 2
What is the octal value of 2, 64
to the base 8?
Let's see the decimal case.
The first question is
0, 1, 0
0, 1, 0, 1
to the base 2
The rule is different for the decimal case.
We know that
for the decimal case
we mark from right to left
using 3 bit.
What is next?
After the decimal,
we mark from left to right
using 3 bit.
Write that question below.
0, 1, 0
0, 1
Before the decimal,
we mark from right to left
using 3 bit.
After the decimal,
we mark from left to right
using 3 bit.
That's it.
We don't have to give additional zeros
after the 3 bit.
Let's go to the chart.
The rest of the rules are same.
What is the value of 0, 1, 0?
2
The decimal is same.
What is the value of 1, 0, 1?
1, 0, 1
1, 0, 1, 5
2.5 to the base 8
0, 1, 0
0.1, 0, 1 to the base 2
Octal value
It is a simple question.
Let's see a more difficult one.
1, 0
1, 1, 0
0, 1, 0, 1, 1 to the base 2
Let's convert it to octal.
There is a point here.
Let's group it.
Before the decimal,
we mark from right to left
using 3 bit.
There is a missing number here.
Let's assign it as 0.
Write these two numbers down.
1, 0
1, 1, 0
The decimal is same.
We have to group from left to right.
0, 1, 0
There is a missing number here.
Let's assign it as 0.
1, 1
0
The grouping is done.
Let's see the chart.
0, 1, 0