Added: 3 months ago
From: numberphile
Views: 30,058
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (321)

Sign In or Sign Up now to post a comment!
  • Is this why Excel has 65536 columns?

  • Only brain-dead 8-bit CPUs had just a problem.  Competent designs like the 8080 & Z80 had enough registers that they presented a pair of 8-bit registers as a single 16 bit register thus allowing you to count up to 65536.

  • Comment removed

  • talk about 100, in pokemon games 100 is the highest level u can trained a pokemon to.

  • @gkcnae Superficial limit. If you have some way to break that limit, like, oh, a debugger (emulaters) or a value-lock (Gameshark, Action Replay, etc), you can break that limit. And I can say, at least for the first six (RBY + GSC), that it suffers from the exact same problem - the value is stored in a single byte and caps out at 255 before weird stuff happens in execution from overflow errors.

  • @gkcnae To continue, most people are not aware of Pokemon's damage formula, but it uses the Level as a discriminant/modifier. This may be the pedagogical explanation - to keep damage from overflowing or erroring out the processor with some weird execution state, it limits the level to prevent that problem.

  • @gkcnae Like copbphoenix said, nothing special about that number, that's just what the developers thought would be a good cap. I mean, it would be unbalanced to be able to train your pokemon to, say... level 10,000.

  • @gkcnae If level = 100 stop gaining xp.

  • make one on 2147483647 (maximum for 32-bit processors)

  • @revrunnertech2772 you mean 4294967295

  • Mind = Blown

  • Can anyone explain to me why we can't go past binary code itself? Like why we can't have computers that would be in... "tri"nary?

  • @taa347 Because the signals of binary work like this: 0 = no electric current. 1 = electric current. So the processor works by having pulses of current on and off, in each 'bit'. The processor processes the numbers and outputs different signals. If you wanted to use trinary, it makes things complicated. Somehow, you need to add a third signal, but there can only be current or no current. You could arguably make a half-power current which = one, and full power = 2, but thats too complicated.

  • @MrSkinnyBill well, that "was" too complicated. We stick to binary because it's always been that way and it's easy enough to stick with. We COULD move out, but why fix something that's not broken?

  • @taa347 Because in a computer the zeros and ones represent the state "electric current" or "no electric current". But thats not that much of a problem... Because modern computers are like 64 bit which means you can count a LOT !

  • One easy way to work out binary: Each "1" in the column is double the value of the first number. EG: Col 1: 1 Col 2: 2 Col 3: 4 Col 4: 8 Col 5: 16 Col 6: 32 etc And adding the values of the 1s in each column. EG: if the 4th column is 1 and all others are 0, then its 8. Examples: 1010 = 8 + 2 = 10 1110 = 8 + 4 + 2 = 14 1001 = 8 + 1 = 9 And so on. Thank me later :)
  • @MrSkinnyBill don't tell me what to do!

  • Is a numberphile supposed to be a play on words for Pedophile?

  • @MegaNyannyannyan The suffix "phile" simply means "lover of". There are lots of different philes just like there are lots of different phobias.

  • @MegaNyannyannyan phile means to love. pedo means child. so pedophile means child lover, or to love children. by putting number in front of phile instead of pedo, it means number lover, or to love numbers.

  • Ok i'm a little confused. But that might be because im only 12. :/

  • @ibeshack Me Too LOL

  • cool!

  • then why can i get a score higher than 255? I'm interested

  • @Asiridem You got a point, but not exactly.

  • LOl, i remember my first time learning binary, only if coding was as easy as binary, it would make my job easier !

  • Comment removed

  • @Asiridem why so removal of comment-y?

  • @Austin101123 I wrote a sarcastic comment, but decided to remove it.

  • So how big can my computer, that runs Windows 7 64bit, how big can it count? And what about letters? how do THOSE work?

  • @shadeslate It depends on the container. TinyInt can hold nothing more than from -255 to 255, but in comparison a Long can hold up to 9223372036854775807, so it really depends on the container.

  • You call zero "naught"?

  • @ghelyar it's not alway 303, it ranges from 301 to 319. but yeah, I'd love to know why as well

  • Now explain Spinal Tap's "eleven" on their amplifiers.

  • is 8 bit computer proccesors the same as 1byte computer proccesors?

  • @Sparatic5725 It depends on how the bytes are counted. They don't always have 8 bits.

  • mind blown

    

  • You should do one on how the first 30 minutes are never actually necessary to be viewed, and can be skipped.

  • then why can ur score go to like 500million

  • @thethinginurnightmar good question...

  • @thethinginurnightmar Because the levels would have been an unsigned integer - that is, the number system he showed us in the video. The score may have been some other data type - say, a long integer (double the number of bits) or a long long integer (quadruple the number of bits). The reason they just went with a standard integer for the level count is probably because that's a relatively common data type to use.

  • @Phlarx Not to mention that the developer of the game probably didn't expect anybody to ever reach level 255. If I remember correctly, the glitch wasn't known for a very long time, pretty much until the era of tool-assisted runs came into play.

  • @Phlarx thank you for correcting this sadly ignorant man

  • @thethinginurnightmar beacause they are variables, not bits;files

  • @thethinginurnightmar Because new styled machine's run on 23-bit processors and 64-bit processors, thus having enough room for thousands of levels. Then allowing people to 'go to like 500million'

  • @thethinginurnightmar because you can use more than one address to store one number.

  • @thethinginurnightmar Because they added more bits.

  • @thethinginurnightmar different processor

  • @thethinginurnightmar I'll attack this question too; you can have a value of multiple depth in terms of the comfortable size for the processor - the processor can just only handle so much at a time. You don't need to calculate all the score at once - just the parts that need updated, and that means it could be segmented (eg: It's all about encoding). The level is directly used to affect the difficulty curve, and may need to fit within the processor during that operation, QED limit.

  • @thethinginurnightmar - I would like an explanation for that, but it probably doesn't count in the same way it does for calculating what level it is.

  • @thethinginurnightmar there is a difference between counting and processing.

  • So... having built a processor with some simulation software, I would expect the circuitry to do nothing about the overflow and the level after 11111111 would be 00000000, I don't see why this would make it crash.

  • @acdc10133 My guess is that the software for Pac-Man wasn't written for a "roll-over", since in this case it would be trying to go to 256, but with 8 bits, it could only produce the number for zero. You run into a problem where there was nothing in the code to recognize "Oh, I am only 8 bit, so let's start over".

  • @DistendedPerinium It ends in a split-screen, the right side looking like the test pattern. Nobody has been able to complete the split screen despite a $100k offering.

  • Am I the only one who searched "Pac-Man level 256" after this???

  • there are 100 people in the world... wait...

  • There are only 11 kinds of people in the world: those who understand binary numbers, those who don't, and those who THINK they understand binary numbers.

  • @HenriqueFTW *confused_chaki_chan.jpg 11? explain your self!

  • @IMakeOrWatchVideos man, this is binary stuff 11 = 3

  • @HenriqueFTW oh lol now i get it. That explains why you list 3 different people. I like that new take. :P

  • Legend of zelda for the nes only carries 255 rupies.

  • @ZManGames Original Metroid only allowed 255 missiles :P

  • i didnt understand till my bro just said it was "just counting in base 2"

    -__- coulda said that earlier bro

  • Good lessons, but that damn marker is giving me goose bumps every time I hear it.

  • 1000 people don't understand binary.

  • @hyphenatedone It seems you dont understand the " x number of people don't like" meme lol

  • 0000 = 0

    0001 = 1

    0010 = 2

    0011 = 3

    1100 = 4

    1101 = 5

    1110 = 6

    1111 = 7

    And that is the truth table for 3 variables...

  • What if you visited level 256 over and over again to map it out, could you solve the level then?

  • FF

  • Ponies.

  • @kstringer24 back in the original pacman days 0-255 was all you got. It was an 8-bit system and wasn't built like modern processors which have extra precision data types (where a 32 bit processor was built to have doubles (64 bits), long long doubles(80 bits), and long ints (64 bits))

    A double is a floating point number, which let you define a value that isn't an integer (such as 1.5 or 10.00001) with some level of precision.

  • @DemiImp Well, actually, the main reason was that the processors back then were incapable of stacking bytes, even some old 8 bit computers can essentially use any size number by splitting them across several bytes. However, this is done on a software level, not a hardware level, so it requires a few more op codes to accomplish, and back then processors would have been slowed down a lot for it. Most modern compiling languages handle this automatically though, so it becomes transparent to coders.

  • @KittenKoder And back then it was all assembly :p

  • @DemiImp Aaah yes, the second method for coding a personal computer. The first, the one I learned, machine code.

  • "Most people don't compulsively play video games."

    You are WRONG.

  • this is bull crap. the same problem would happen on a 64 bit machine if you used a byte to store the level, so why not use an integer or a long etc.

  • @kstringer24 CPU's are built very differently now, aswell as not being the entire computer in itself... =P

  • @kstringer24 Technically they could have prevented this and had more levels. My guess it they assumed not one would get to there.

  • I freaking love 8 bit systems... converting 8 bit binary to hexadecimal is so damn easy and intuitive.

  • Another way to think about binary numbers is powers of 2. Ex: 11111111 = 2^7 + 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0 = 255. If any of the binary numbers are zero you simply don't add that power of two.

  • should do a numberphile for 303 to work out why youtube always stops at that number of views for the first few hours of any popular video. I'm a software engineer and I've never been able to work that arbitrary number out.

  • @ghelyar It doesn't always stop at 303, to my knowledge it is between 200-400 (very crudely).

  • @ghelyar lol. It's just a place where it stops and makes sure that the views are unique.

  • @ghelyar It's a random number -- and it's not a bug at all, it's actually intentional.

  • @Asiridem I know it's not a bug and that it is intentional. I also know that it isn't a random number.

    It's likely a result of some form of caching, it's just a strange number to stop at.

    There are actually many more numbers that it stops at, it's just that 301-303 is commonly seen because it's the lowest, so you see it as soon as any popular video has been up for a little while.

  • @ghelyar Then why even ask the question? It's obvious that YouTube chose that exact number.

  • @Asiridem It's clearly intentional that it happens, not that the number is specifically what it is. There is no reason for it to be what it is or why it stops there.

    Idiot.

  • @ghelyar No, you fucking cuntflap. **You** don't know the reason. Stop acting smarter than you are, fucking dipshit.

  • @Asiridem Calling someone a dipshit is immature, and a sign of stupidity in itself. You should be able to explain your argument without insulting him, if YOU were smart.

    Hmm.

  • @shadeslate Take your butthurt elsewhere.

  • @Asiridem That was cute. As if you telling me that was going to make me doing anything. I'm only pointing out the obvious. You should take a more mature outlook on life, and accept criticism. Blocked.

  • @shadeslate Sure thing Tyler Marcel Johnson from Nashville, TN attending Whites Creek Comprehensive High. Go back to writing shitty poems, mkay?

  • @Asiridem cuntflap?

    you watch countdown? ;)

  • @Austin101123 What the shit is countdown?

  • @Asiridem it is where cuntflap originated from lol

  • @Austin101123 >lolno

  • @ghelyar YouTube stops counting views then on popular videos and refreshes then every couple of hours...

    You have no idea how much this saves in terms of cost and simplicity.

    Because - yes, they frequently get view counts at the same 0.00015th of a second, which would cause a glitch on the server and you wouldn't be able to view the video.

  • You need to do a video with James further going into computation. It's very I interesting.

  • I finally know how binary is counted! THANK YOU!

  • @Oblic008 : check out hexadecimal ! can be useful in some situations ^^

  • Tetris!

  • Your video is popular on Benin

  • If they haven't already I should attempt (and fail) at making a pac man game which randomly creates a maze and the movement of the ghosts.

  • I understand completely. How, though, can Pac-Man keep score beyond 255?

  • @jodydessi In the same way as going from 4 to 8-bit counting here, by using multiple bytes to count. It's a bit more work but kicks the can further down the road: 65535 for 2 bytes, 4294967295 for 4 bytes, 18446744073709551615 for 8 bytes. Then the problem comes back again! The programmer just has to hope that users stay well within the limit, which doesn't always happen: e.g. the Y2K bug was the decimal equivalent, showing the impossibility of trying to count past 99 with just two digits.

  • @jodydessi

    2 ways you can do it.

    In the case of fixed hardware and fixed field sizes (a maximum score), you just have enough memory registers to store the score. 8 bits goes to 255. Have another set to go even further.

    This problem got worse as computers got bigger, which led to storing data on punch cards, then to hard drives, and in the near future, as holograms. (possible now, but stupidly expensive)

    This is when virtual memory came about to extend working sets of numbers even further.

  • 15 years to explain this? I must be a prodigy... I learned binary and the level 256 glitch all in the same semester and explain it back to friends every now and again with clarity. I'm not though.

  • @BeBoBli

    I'd like an explanation then! :D Just what IS binary? Not much of a computer person, sorry D:

  • @AngelixArch

    Binary is the most basic language of a computer's understanding. 1 being on and 0 being off. When you have large bit registers as shown in the video you get bigger numbers by incrementing. A 4-bit example: 0000 = 0, 0001 = 1, 0010 = 2, 0011 = 3, and so on. As you see, it increments from the right. As you increment by 1, you can obtain higher numbers by doing so. If you add a 1 to the rightmost and a 1 is already there then you should change it to a 0 and move one left.

  • @BeBoBli

    Then you start going back after 1111?

  • @AngelixArch

    It reaches full capacity and then rolls over back to zero; hence the level 255 glitch... instead of 1111 1111, it went back to 0000 0000. Programmers have to be careful not to allow bit registers to overflow like this because sometimes weird things may happen. In this case, I presume a lot of the data looks at the level number, but level 0 does not exist, at least intentionally.

  • @BeBoBli

    Ah :O This is interesting... Need to study up on it some time. :3

  • @AngelixArch

    /watch?v=p5BIcU6CEE8 Here is another 255 glitch found in Super Mario World that might interest you that I just so happened upon. I dig SNES hacks so it was coincidentally in related videos.

  • There are only 10 kinds of people:

    those who understand binary and those who don't.

  • The wrapping in memory systems is great for checking or modifying edges in arrays :D It's an easy way to create a torus, sphere, cylinder or Kleins bottle out of a simple 2d array.

    I remember finding the memory limits on my first pong machine, which couldn't keep score from 16 and up and it would just be non-reactive.

  • @FHomeBrew :D

  • 255 33...

  • waka waka waka waka waka!

  • Ehm, sry, not the highest possible value, but the number of possible values. Not the same thing, sry. :(

  • For the highest possible value (i), with a number (n) of bits:

    i = 2^(n-1)

    I remember figuring this out myself when I was much younger, and understood binary stuff. I just love it all. I still try to figure things out, but the bar is much higher now, and I'm just not good enough for most of it. But now we have the internet!

  • @antiHUMANDesigns Ehm, sry, not the highest possible value, but the number of possible values. Not the same thing, sry.

  • The programmers could have made the game go further by allowing double registering of the level number, making a psuedo-16 bit number...the same way it remembered your score in the game...remember, you could score more then 255 points.

  • 8 people can't carry on.

  • 1000 people can´t count in binary

  • The 8 people that disliked this failed to understand 8 bit processing

  • @ajthrax1 I hope you mean the 1000 people who disliked it

  • @erivila what are you talking about? 8 dislikes...

  • @ajthrax1 in binary...

  • binary 101

  • @t47i i c what u did there

  • Base 2 math 1 2 4 8 16 32 64 128 256 512 1024 2048 4096...

  • Comment removed

  • An 8-bit processor can only process 8 bits per cycle. Eight bits is 255. He was right.

  • @jacksawild thats only if it has one 8 bit register.

  • There are only 10 kinds of people in the world: those who understand binary, and those who don't.

  • @aluisious Lolololololo omg dude ur so celver hahah dude. u gonna solve the problems to the universe bro lhahahahahaq lolo ldude

  • @PeculiarTactics 32 bit computers have been calculating double precision floating point numbers forever, and they're 64 bits.

    OH MY GOD BUT THEY CAN'T COUNT THAT HIGH.

    Sure they can. Computer scientists are way smarter than you, and figured out how to process numbers bigger than the size of a register a long time ago.

    Probably took you months to learn how to count to 11, didn't it?

  • @aluisious Are you autistic? You said an 8 bit processor can hold 256 values and your a fucking retard lol. Counting the ZERO ( 0 ) it can only hold 255 values. Jesus christ kid lay off the prescription drugs. Wow.

  • @PeculiarTactics I think you mean "Not counting the ZERO ( 0 ) it can only hold 255 values." I don't now why you wouldn't count 0 as a value. Get with the times man, 0 is your friend. There are only 255 non-zero values you can count with an eight bit register though.

    Yum, delicious meds.

  • @aluisious

    Haha !!! That is such a geek joke !! I feel bd that I got it !! But it's still a freakin good one !!!

    Cheers

  • @aluisious made your number of likes 100 (or 4 for those who don't understand binary) lololol

  • @aluisious You stole my comment! lol

  • @aluisious :D I am wearing a shirt that says that nao.

  • @aluisious More people understand binary than I thought. 10000110 people so far!

  • Make a video about 12,550,821 and Minecraft =D

  • i hate the sound of the writing on this paper

  • Like your videos but like 60% of this video was just you drawing out ones and zeros

  • @FastFoodConnoisseur Shut up.

  • Two computers are talking:

    "I've had a bad dream."

    "What was it?"

    "11101000101011100101011011101­10100001110112"

  • @matt92hun no we call that a blue screen ;)

  • @matt92hun stole that from futurama

  • @IanTheMontrealSkater I'm not sure what you are talking about. A friend of mine told it.

  • @matt92hun oh... well i saw it on futurama

  • @IanTheMontrealSkater No problem, there are no new jokes anyway.

  • Great videos, guys. 11/11/11 and this one are my favorite so far. The 16 video was too basic.

  • So much wasted paper. He needs a whiteboard.

  • If pacman uses thathow is the score counter go so high

  • the marker on the paper made my spine tingle

  • Genius!

  • GREAT!

  • I was also fascinated by this around the age of 12, I'd aquired a gameshark and an SNES emulator around the same time and I was interested in why 8 bit values could only go up to 255 and 16 bit values could only go up to 65535

  • wocha nomba?

  • He sounds and looks like Robert Irvine, the chef.

  • Talk about 16 bit hexadecimal next.

    Also a follow up question, how is it possible for the score to be more than 255 in pacman?

  • @ZeQiR Using more memory to keep the score. With 16 bits (unsigned) you have a maximum of 65535. Most games' score is in multiples of 10, so just add a zero at the end and you can count up to 655350 with just 16 bits. Use 32 bits, and the number actually becomes hard to read out loud (2^32-1, you can do the math).

  • The furthest to the right column is worth 1 in decimal, the 2nd from right is worth 2, the third to the right is worth 4 in decimal. Each colum along is 2* the number on the column to it's right. So in 8 bit, 11001011 is like 128+64+8+2+1 which equals 203. 11111111 is 128+64+32+16+8+4+2+1 which equals 255.

    oh and, 128*2 = 256, so if all are 1's then the furthest value to the left *2 then minus 1 is the answer. eg. 11111111 is 128*2 -1 = 255