If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains ***.kastatic.org** and ***.kasandbox.org** are unblocked.

Main content

Current time:0:00Total duration:4:12

let's now see if we can convert a larger decimal representation to binary so let's say that we have the number 114 and this is its decimal representation see if you can pause the video and rewrite this in its binary representation so I'm assuming you have at least tried now so we can work work on this together so as always we just want to decompose this into the sum of powers of two and you can always decompose this is any number into a sum of powers of two and we can once again just remind ourselves the powers of two two two zeros one two to the first power is 2 2 to the third power is 8 2 to the fourth power is 16 2 to the fifth power is 32 2 to the sixth power is 64 2 to the seventh power is 128 and that gets us large enough we've already gotten larger than the number here so let's see 114 can be re-written as the largest power of 2 that is less than or equal to that is 64 so we can rewrite it as 64 plus what's going to be left over 64 plus 50 now we're gonna have to rewrite 50 as the sum of powers of 2 and let's see 50 is going to 50 is thus it can be re-written as see the largest power of 2 that is less than or equal to 50 is 32 so we can rewrite it as 32 plus 32 plus what is that plus 18 and now we have to rewrite 18 as the sum of some powers of 2 well 18 the largest power of 2 that is less than or equal to 18 is 16 so this is going to be 16 and then 16 plus 16 plus 2 and lucky for us too I guess not that lucky we have to do this a good bit 2 is a power of 2 2 is a power of 2 so we can rewrite this 114 is equal to is in the gift myself enough real estate here is equal to 64 plus 32 plus 32 plus 16 plus 16 plus 2 plus 2 I've just written 114 as the sum of powers of 2 and once again we can be used as 1 64 plus 132 plus 1/16 plus 1 2 now we're ready to really write this in binary so let's just write the different place values so remember this is the ones this right over here is the ones place value or the ones place I should say I'm actually let me do this in a different color so this is going to be this is going to be the ones then we're going to have the twos then we're going to have the fours fours place then we're going to have the eights place eights place then we're going to have the 16s place tells you how many 16s are in this number then we're going to have the 30 twos place 30 twos place how many 32 s are in this number and then you're going to have the 64 is place 60 fours so how many ones do we have here well we have zero ones how many 2's do we have well we have one two you're going to have one of something or zero there's only two digits if you're dipping in binary now we have no force no fours here no eights no eights we have a 16 we have a 16 we have a 32 we have a 32 and we have a 64 so in binary the number 114 in decimal would in binary would be written as 1 1 1 0 0 1 0