# Pre-Algebra 3 – Decimal, Binary, Octal & Hexadecimal

Hello. I’m Professor Von Schmohawk
and welcome to Why U. In the previous lectures, we explored some
examples of the earliest number systems which were used primarily for counting objects. These counting numbers are called
“natural numbers”. The natural numbers start at one
and can count to arbitrarily large quantities. As we have seen, Roman numerals are one of
many possible ways to represent natural numbers. The Roman system was eventually replaced with
the modern decimal number system which uses “positional notation”
and only ten numeric symbols. The decimal number system was found to be
superior to the ancient Roman system because of the simple rules it uses
to create numbers. In the decimal system there are ten numeric
symbols, 0 through 9, called “digits”. Depending on the column they occupy these digits represent the quantity of ones tens hundreds thousands and so on which make up the number. In positional notation,
the column occupied by a digit determines the “multiplier” for that digit. For example, in the decimal system the value of the right-most digit
is multiplied by 1. The digit in the next column to the left
is multiplied by 10. The next digit is multiplied by 100
and so on. The value of a number is the sum of
all its digits times their multipliers. For example, the value of
the decimal number 1879 is 1 times 1000 plus 8 times 100 plus 7 times 10 plus 9 times 1. In any positional notation, each column’s
multiplier differs from the adjacent column by a constant multiple called
the “base” of the number system. In the decimal system, each column multiplier
is ten times the previous column. Therefore the decimal system is called a
“base-10” number system. There are an infinite number of columns in
the decimal number system with each column multiplier being ten times
bigger than the column to the right. However, when writing a number,
the zeros in front are normally not written. We can count up to 9 using only the ones column. Once we reach 9 the ones column starts over at 0 and the tens column increments. As we continue counting the tens column counts the number of times that the ones column
has passed from 9 to 0. In other words, the tens column registers
the number of tens which we have counted. This continues until we reach 99. At that point
the ones and tens columns start over at 0 and the hundreds column increments. The positional notation system is simple. Every time a column passes from 9 to 0 the next column to the left increments. How is it that we ended up with a number system
based on multiples of ten? There is not any good reason
for choosing ten over some other number other than the fact that people have ten fingers and probably originally communicated quantities
using their fingers. But what if we were cartoon characters
with four digits on each hand? Is it possible that in cartoon land everyone uses a number system
based on multiples of eight instead of ten? How would a base-8 or “octal”
number system work? In octal there are only eight numeric symbols
the symbols 0 through 7 are used. The symbols 8 and 9 are not needed. Counting in octal is very similar
to counting in decimal. Since there are no symbols for 8 or 9 the highest quantity which can be represented
in the ones column is 7. Counting an eighth item
causes the ones column to start over at 0 and the next column to increment. So the second column
counts the number of eights. Therefore in octal
the number following 7 is 10 which looks just like the decimal number ten. After octal “10” comes octal “11”, “12”, and so on until we get to octal “17”. At that point, we go to octal “20”. The second column has now counted
two “eights” or sixteen. We continue like this until we get to the
highest number we can represent with two digits octal “77”. At that point, the ones and eights columns
start over at 0 and the third column increments. The 1 in the third column represents
eight “eights” or sixty-four. Each column multiplier is
eight times the previous one. Every number which can be written in decimal
can also be written in octal although after counting to 7 the way the quantities are represented
is completely different. It is easy to convert an octal number to decimal when you consider how positional notation works. Let’s take for example, the octal number “1750”. As in decimal, the value of the octal number
is the sum of all its digits times their multipliers. So the number “1750” represents 1 times 512 plus 7 times 64 plus 5 times 8 plus 0 ones which adds up to the quantity
which in decimal is called one-thousand. You may sometimes see a small subscript 8 or 10
after an octal or decimal number in case there may be some confusion
about which base is being used. Digital computers use electronic circuits
called “flip-flops” to represent numbers. Each flip-flop can store a single bit
which can represent either a 0 or a 1. Multiple bits can be combined to represent
a base-2 or “binary” number. In the binary number system
0 and 1 are the only two numeric symbols. Since binary is base-2 each column multiplier is two times
the multiplier of the previous digit. And just like decimal or octal numbers the value of a binary number is sum of
all its digits times their multipliers. Since the digits are either 1 or 0
the calculation is simple. We just add the multipliers
of all the columns which contain ones. For example, the binary number 11010 represents 1 sixteen plus 1 eight plus 1 two which is equal to twenty-six. Even though digital computers
store numbers in binary it can be quite tedious to write down
or remember large binary numbers. For instance, the number one-million
in binary is one one one one zero one zero one one zero zero one one zero one one zero zero zero zero. Early in the history of digital computers engineers found that it was easier
to use octal notation than to deal with long strings
of ones and zeros. Three binary digits can be represented
by a single octal symbol. It is easy to memorize the eight possible
combinations of three binary bits. To convert a multiple-digit octal number
to binary each octal digit in the number
is converted to a 3-bit binary equivalent and the binary digits are all combined
into a single binary number. Any leading zeros can be removed. To convert a binary number to octal
we do the same thing in reverse. To convert this binary number back to octal we split it into 3-bit groups
starting from the right and each 3-bit group is then converted
to its equivalent octal symbol. So the octal equivalent to this binary number
is “3654660” a lot easier to remember
than all those ones and zeros. Today, computer storage is normally organized
into 8-bit groups called “bytes”. Because of this, many computer engineers
prefer to use base-16 otherwise known as “hexadecimal” or “hex”
converts to a single hex symbol. Two hex symbols represent exactly one byte. Even fewer digits than octal are required
to represent a given number and it’s just as easy to convert
back and forth to binary. Hexadecimal numbers
use sixteen numeric symbols. The symbols 0 through 9
are used just as in decimal but six more symbols are needed. Instead of making up new symbols,
the letters A through F are used to represent what we call
ten through fifteen in decimal. Counting in hexadecimal
works the same way as in decimal or octal except that hex uses sixteen symbols per digit. Because each column multiplier is
sixteen times larger than the previous column hexadecimal can represent large numbers with fewer digits than octal or decimal. When counting in hexadecimal after getting to F which is decimal 15 we go to “10” which is decimal 16 then “11”, “12”, and so on. Once we reach 1F we go to “20” which is decimal 32. When we get to the largest number which we
can represent with two hex digits, FF we go to “100” which is decimal 256 and so on. As we mentioned using hex notation, four binary bits
can be represented by a single hex symbol. Each of the sixteen possible combinations
of four bits is equivalent to a single hex digit. Let’s convert the same binary number as before
to hex. Starting from the right,
we group the digits into groups of four. Each group of binary digits is then converted
to its equivalent hex symbol. So we have seen how the same natural number can be represented in base-2
using two numeric symbols base-8 using eight symbols base-10 using ten symbols and base-16 using sixteen symbols. But no matter how we choose to write
this natural number it still represents the same quantity. As you have seen we use the same basic rules for counting in binary octal decimal and hexadecimal. The only difference is that each base has
a different number of numeric symbols. So using positional notation we can create a number system
using any natural base we like. Try creating one of your own. Who knows, it might catch on!

### 100 thoughts on “Pre-Algebra 3 – Decimal, Binary, Octal & Hexadecimal”

• December 1, 2012 at 5:24 pm

Thanks, great video. đ

• December 8, 2012 at 10:55 am

Very well explained and very fluid and clear ! Thanks

• January 10, 2013 at 6:02 pm

3:21 I laughed at the sheep hovering in midair. Thanks for discussing these topics in a clear — and sometimes mildly funny — way.

• January 24, 2013 at 12:01 pm

TRY BASE 1

• January 28, 2013 at 5:47 am

Very easy to understand, thanks!

• February 1, 2013 at 10:57 pm

As a 20 year old male who did horribly in school in math, I must TRUTHFULLY say that..cartoons are better at explaining things than people lol.

• February 7, 2013 at 3:44 pm

base 1 is just plain ol' tally marks

• February 10, 2013 at 4:48 am

This was quite informative. I now know everything!

• February 11, 2013 at 7:52 am

This seems more like a course on understanding the 16 base number and converting it to a 10 base number system than understanding "any" base number system.

• February 12, 2013 at 4:01 pm

10=1111111111

• February 13, 2013 at 3:38 pm

I thought 0 was a natural number too

• February 14, 2013 at 12:25 pm

My teacher told me that 0 is not a natural number. He said it was a part of the 'whole set'. Was he wrong? (I'm from Australia)

• February 14, 2013 at 11:30 pm

wow thank you guys so much, absolutely chuffed i found this.

• February 17, 2013 at 9:32 am

Wow, love the presentation style. Great job and thanks for posting!

• February 19, 2013 at 1:13 pm

I came here because I attended a fail of a tut class in com sci and didn't know how to convert for **** after the 90 minute session. After watching this 14 minute video I now know (and will not forget) how to convert between the different numeral systems.

• February 26, 2013 at 5:00 am

Mayan system is also vigesimal

• March 4, 2013 at 6:47 am

THANKS PROFESSOR VON!!!!!!!!!!!!!!!!!!!!!!!!

• March 4, 2013 at 11:46 pm

This video is one of the best for me trying to help others learn hex and binary. The animations are great.

• March 5, 2013 at 8:10 am

this doesnt tell me what a base 3 number system

• March 9, 2013 at 11:10 am

great explanaton đ

• March 10, 2013 at 4:15 pm

• March 21, 2013 at 8:27 am

thanx for such a feed it was awesome

• April 10, 2013 at 12:50 am

so you can have base n (assuming n doesn't equal 0, 1, or infinity) where n=any number?

• April 10, 2013 at 9:45 pm

i thought there wasn't a 1-base system because wolfram alpha didn't know what i ment.

• May 4, 2013 at 6:21 pm

Lets create the base 30 notation for the numbers the islanders fromīģŋ the Coco-Loco island shown during the 1st movie used! zup, blup, dop, trom, mim, zap, wini, lumbi, bimpy, nichi, fromp, waked, trimble, walakai, pramet, jolo, honzo, kolo, trob, walep, zumi, mombozo, elimi, toremu, palezib, smit, banzulu, ikina, itchina, and back to blup zotan, blup blup, blup dop again! (zotan was degraded from 30 to 0, so it retains its important role – blup zotan zotan = 30 squared.)

• May 25, 2013 at 12:50 pm

I personally think Balanced Ternary is one of the most interesting number systems. I would love to see a video on that. It uses three digits like Base-3 and also increases by powers of three with each position, but the digits used are 0, 1(or +) and -1(or -). So the number 8 in Balanced Ternary would be +0-. 1×9+0x3+(-1)x1=8. And -8 is represented -0+, no need to stuck an extra symbol in front.

• May 28, 2013 at 4:08 am

Didn't the ancient Mesopotamians used a 360 base number system. That is how we got our 360 degrees in a circle. Also how we got our 60 minuets and 60 seconds as it was 60 seconds in a minute and 60 minutes in a degree as it was used with the sundial.

• June 10, 2013 at 7:07 pm

one I made up out of boredom is a base 35 with 0-9 and A-Z omitting letter O to dispel confusion of zero and O. So the base 35 number "5A7" in decimal would be 6482.

• June 23, 2013 at 4:46 am

Cool, well explained!

• June 23, 2013 at 9:09 am

Very nice!

• July 4, 2013 at 10:24 am

realy nice explanation
thanks

• July 16, 2013 at 12:18 pm

agreed, im going to watch them all!

• July 29, 2013 at 11:53 pm

omg thank you so much! has helped a lot, I'm beginning to self learn computer science and trying to get my head around the binary system etc
Great vid, I'm subscribing xx

• August 9, 2013 at 10:43 pm

it's idiot proof

• September 13, 2013 at 4:57 am

Thanks for everything man, it's just simple math…

• September 26, 2013 at 11:23 am

Cheers!

• October 5, 2013 at 8:15 am

If my calculation is correct, your expression of 1 million in binary is incorrect.

• November 3, 2013 at 10:01 pm

This is just awesome, it was sooo useful

• November 7, 2013 at 12:10 am

Because our hands would not be symmetrical.

• December 7, 2013 at 9:11 pm

• December 7, 2013 at 10:59 pm

How does addition and multiplication work in base -10? For example -19=1, because (-1)(-10)^1+9(-10)^0=1, so 19+8=7, 18*18=-16 and so on…

• December 7, 2013 at 11:07 pm

I'm sorry, that plus sign is actually a minus sign.

• December 7, 2013 at 11:14 pm

(-1) * (-10)^1 + (-9) * (-10)^0 = 1. Now it's correct.

• December 21, 2013 at 3:25 am

• January 17, 2014 at 5:04 pm

my math teacher tell me to go here

• February 16, 2014 at 10:18 am

ĐŅĐĩĐŊŅ Đ¸ĐŊŅĐĩŅĐĩŅĐŊĐž Đ¸ ĐŋĐžĐˇĐŊĐ°Đ˛Đ°ŅĐĩĐģŅĐŊĐž. ĐĄĐŋĐ°ŅĐ¸ĐąĐž!

• August 7, 2014 at 9:14 pm

These vidoe is helpful for beggineers that want to learn networking

• September 8, 2014 at 6:10 pm

this is an awesome utility!! helps with my math drills big time. ThanksÂ

• September 8, 2014 at 7:05 pm

did he say at the endÂ  to create my own number system..?Â  yeah in time maybe….but this kind of information is, to me, is very complex, and requires drill after drill to absorb. It's highly intimidating, but manageable. When I came into IT I think I was that dude all IT pros hate, the one who knows enough to be cocky, around laymen, but not enough to stand tall in front of real CIS experts. I have since humbled myself and I am realizing the more I learn the less I realize I actually understand. This field of academia, to me is so exciting and cool, and yet overwhelming at the same time. ButÂ  practice, practice, practice and the repetitions start formulating the conceptual framework in your mind almost at an osmotic level. Seriously though computers rock!!!! I am so digging this!!!

• September 8, 2014 at 7:38 pm

I don't know bout ya'll but I have multiple nerd-gasms every time I learn something new on hereÂ  or in this field in general.

• September 8, 2014 at 7:58 pm

ok Dr. Schmohawk is bitch slapping me inÂ  the face……I will get this!!!!! view again!!

• September 14, 2014 at 4:11 pm

I understood everything but felt sleepy (during lecture for same topic) in my college.this is very nice and easy to understand.

• September 15, 2014 at 9:11 pm

Best video on this for a newbie I've seen so far.

• September 19, 2014 at 3:31 pm

Awesome !!! Thank u Professor !

• October 13, 2014 at 7:33 pm

THIS IS AMAZING!!! I missed the class in compsci where my prof. was explaining what these numbers were. this helped SO MUCH!! also great for conversions :)) any compsci/compeng majors can appreciate this video!!!

• January 25, 2015 at 9:29 am

I support hexadecimal system as the common counting system of human beings.

• March 20, 2015 at 2:48 pm

ŅĐŋĐ°ŅĐ¸ĐąĐž

• March 22, 2015 at 6:40 am

thnks a lot !!

• May 7, 2015 at 3:18 am

How about making numbers to the base of three-quarters.

• November 7, 2015 at 4:29 pm

this video actually helped me understand what binary numbers are

• November 30, 2015 at 2:33 pm

#MyWhyU ==> Perfect explanation , thanks

next time also explain how to convert point values( .212 , .101101 ,…..)

• January 5, 2016 at 7:19 pm

Thank you! Way better than a power point

• February 8, 2016 at 4:48 pm

cool explanation and style đ

• August 2, 2016 at 10:51 am

Thank you. You've explained so much better than my prof in uni

• August 30, 2016 at 3:14 pm

way easier than school

• September 1, 2016 at 9:14 pm

base 3/base 10
123. ?

• September 15, 2016 at 10:09 am

This helped a bit in me understanding octal. I seem to get hex better though, actually I feel that I don't, I think it just easier to toggle an early personal (hobby) computer with it. Like the IMSAI 8080. Now I just need to memorize what each equals in binary to toggle the switches. Then I'll memorize 8-bit ASCII by hex.

• December 11, 2016 at 7:54 am

what about base 4 with including 0,1,2,3

• December 16, 2016 at 3:24 am

Base 3=2
0,1,2,10,11,12,20,21,22,100

• December 16, 2016 at 3:28 am

Base 20=I
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I

• December 24, 2016 at 1:30 am

Vigesimal goes 1 2 3 4 5 6 7 8 9 A B C D E F G H I J 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 1G 1H 1I 1J 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 2G 2H 2I 2J 30 ———————————————————– JJ —- 100

• January 31, 2017 at 1:54 am

2017 is MMXVII. Smart.

• January 31, 2017 at 11:23 pm

MyWhyU vs mathantics.

• March 16, 2017 at 8:00 pm

Amazing

• March 24, 2017 at 7:36 am

đ

• May 10, 2017 at 6:21 am

Vigesmal goes 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F

• June 1, 2017 at 10:02 pm

I thank you everyday for making these videos.

• August 7, 2017 at 5:39 pm

I'm 11

• August 10, 2017 at 11:35 am

I hope you know a fifth grader is learning from this

• September 20, 2017 at 6:39 am

Thank you…Good vedio

• February 4, 2018 at 2:24 am

This guy who made this video is a genius

• February 25, 2018 at 4:57 pm

one of the best explanation with perfect animation.

• March 21, 2018 at 10:12 pm

This series reminds me of Cyberchase. Man, I loved that show…

• April 10, 2018 at 12:17 pm

3:33 oh my god so many sheep [Falls Asleep]

• April 29, 2018 at 8:03 pm

base 7 (numbers 0, 1, 2, 3, 4, 5, 6)
0 1 2 3 4 5 6 10 11 12 13 14 15 16…………63 64 65 66 100 101
x343 x49 x7 x1
1 4 6 6
1×343 + 4×49 + 6×7 + 6×1
343+196+42+6
587

• May 6, 2018 at 11:01 pm

Numbers : 1-1000

• June 11, 2018 at 7:46 am

The amount of effort that went into this is actually really appreciated. Like who animated this? 10/10 (or should I say 1010/1010)

• June 22, 2018 at 6:23 am

Amazing video đđ

• July 10, 2018 at 10:21 am

The video is superb and impeccable.

• September 4, 2018 at 10:55 pm

Who else is watching this for Computer Science Principles

• January 3, 2019 at 7:28 pm

Ez

• January 9, 2019 at 10:05 am

• January 9, 2019 at 10:21 am

base 62:
1,2,3,4,5,6,7,8,9,A……..x,y,z ,10,11

1 2 4 S z

62^4 Times 62^3 Times 62^2 Times 62Times

• January 21, 2019 at 10:52 am

1/1/1/1/1/1/1/1=10(1)
128/64/32/16/8/4/2/1=10(2)
2187/729/243/81/27/9/3/1=10(3)
16384/4096/1024/256/64/16/4/1=10(4)
78125/15625/3125/625/125/25/5/1=10(5)
279936/46656/7776/1296/216/36/6/1=10(6)
823543/117649/16807/2401/343/49/7/1=10(7)
2097152/262144/32768/4096/512/64/8/1=10(8)
4782969/531441/59049/6561/729/81/9/1=10(9)
10000000/1000000/100000/10000/1000/100/10/1=10(10)

• February 22, 2019 at 6:51 am

Where we can find solutions

• May 25, 2019 at 7:24 pm

Yeah Hexadecimals are killing my test scores man -_-. fine with binary and changing to decimals. Yet, hexadecimals really i don`t get, mostly when i`m working with multiple place holders.
If i`m changing 17 to HEX, i understand its (1*16)+(1*7)=23…. Yet why am i not doing (1*16)+(1*17) to get 33?
what would happen if i worked with 349 or something crazy, how would i solve?
P.S. i am self studying all this and learning from the bottom to hopefully self-learn programming with a solid base. Don`t be to harsh.

• June 13, 2019 at 2:54 pm

These videos are grossly good. Makes me question my public school education.