PDA

View Full Version : Why is 255 the magic number?



backguard
05-18-2008, 04:25 PM
??????

modest9797
05-18-2008, 04:45 PM
Could you explain a little more?

Amos
05-18-2008, 04:48 PM
Because it's the largest number that can be stored in a single byte.

udisi
05-18-2008, 05:50 PM
Because it's the largest number that can be stored in a single byte.

we have a winner.

Flack
05-18-2008, 06:00 PM
In base 2, 255 = 11111111.

Per Wikipedia: This number occurs especially frequently in video games when a small number is needed, such as in the original The Legend of Zelda for the Nintendo Entertainment System where the maximum number of Rupees (the currency of the game) is 255. In Metroid Prime, for the Nintendo Gamecube, 255 is the maximum number of missiles Samus Aran can hold. In the Madden NFL series, the maximum points you can score is 255. If more points are scored, the game score remains at 255 regardless. In Starcraft, the maximum number of kills shown for a unit is 255. In Square Enix's Final Fantasy series, it is often the maximum value for any given stat. In Pac-Man, the highest level you can reach is 255, The game glitches from that point on. In World of Warcraft although the game level cap is only 70, the engine supports up to 255. The usage of 8 bits for storage in older videogames has had the consequence of it appearing as a hard limit in many videogames. It was often used for numbers where casual gameplay would not cause anyone to exceed the number. However in most situations it is reachable given enough time. This can cause many other peculiarities similar to the above listed to appear when the number wraps back to 0.

Brought to you by Tootie.

http://upload.wikimedia.org/wikipedia/en/e/ec/Kim_Fields_One_to_Grow_On.png

majinbuu
05-18-2008, 06:03 PM
Like the other guys said, a single byte can hold 256 values, from 0 to 255. Since a byte equals 8 bits, this works particularly well on 8 bit machines.

Visually: A byte looks like this xxxxxxxx, where x is a 0 or a 1 and each x represents 1 bit. So you can have 01010101, 11111111, 00110011 and so on. Doing the math, since each bit can be in one of two states, and there are 8 of them, 2^8=256.

I hope that made sense :)

Sam

acem77
05-18-2008, 07:11 PM
dont forget hexadecimal ff=255
you will see hex used in many cheat deviced aka action replay, cheats ending in 63hex = 99 dec for 99 lives or ff used for maxed life.

In mathematics and computer science, hexadecimal (also base-16, hexa, or hex) is a numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or a through f) to represent values ten to fifteen.

Its primary use is as a human friendly representation of binary coded values, so it is often used in digital electronics and computer engineering. Since each hexadecimal digit represents four binary digits (bits)—also called a nibble—it is a compact and easily translated shorthand to express values in base two.

RadiantSvgun
05-18-2008, 08:09 PM
I guess you are referring to stuff like Lagoon, YS, and Mario RPG. That everything maxes out at 255?

I always thought that it was a cool sound number.

Jorpho
05-19-2008, 12:18 AM
I remember in Final Fantasy Adventure, your money would max out at 65535 = FFFF h = 256^2 - 1.

tom
05-19-2008, 02:23 AM
But in generic terms, it's always called 256 (64, 128, 256 etc...), why's that?

Icarus Moonsight
05-19-2008, 02:59 AM
It's not a generic term. A byte can have 256 values. One of which is zero. Seems like paradox when you look at it in a usual day-to-day base 10 mentality where 1 is the first value. That is only because (in real life) it's stupid to count things that are not there. LOL

Haoie
05-19-2008, 03:40 AM
While we're here, I believe character levels in Star Ocean cap out at 255 as well.

rbudrick
05-19-2008, 01:46 PM
Since Contra's score uses two bytes, the maximum score is 6,553,500, the maximum that can be stored in two bytes (with two zeroes thrown in at the end, since nothing in the game will ever increment the ones or tens digit).

-Rob

blue lander
05-21-2008, 10:54 AM
255 is the largest number you can put in a single byte unless you're using two's compliments to represent negatives. In that case, 11111111 actually is -1 and the largest number you can have is 127 which is 01111111.

Wabs
06-19-2008, 02:17 PM
I remember in Final Fantasy Adventure, your money would max out at 65535 = FFFF h = 256^2 - 1.

Something similar in Perfect Dark (N64) : the number of people killed in your Combat Simulator stats can't get higher than 1 048 575 which is 2^20 - 1. :)

mailman187666
06-19-2008, 02:51 PM
looks like I'm one of the few people here that were thinking about getting high and staring at the cuties in highschool rather than studying math :/. You guys are whizes. Of course I was never in the higher math courses.

jb143
06-19-2008, 03:06 PM
This isn't really stuff they taught in math class. More than likely all these guys were taking computer science classes rather than getting high and staring at the cuties :p

rbudrick
06-20-2008, 11:14 AM
This isn't really stuff they taught in math class. More than likely all these guys were taking computer science classes rather than getting high and staring at the cuties :p

Aww, come on. There was always time for both! Women love dudes with huge brains...as long as they aren't egotistical, ugly, antisocial and awkward. Unless he has some money, of course. :D

Kdding ladies. Officially,anyway. ;)

-Rob

mailman187666
06-20-2008, 01:07 PM
well either way, as you can see where not paying attention didn't help me out too much ha ha ha.