O'Reilly logo

Beginning Math and Physics for Game Programmers by Wendy Stahler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Computer Conversions

Often, you hear people talk about 50-kilobyte files or 2-gig hard drives. These might sound like random numbers. It's important to understand how all these quantities are related. They all describe quantities of information that the computer can read or store. Remember that the computer actually reads binary code.

When you program code in a language such as C++, you need a compiler to translate your code into binary code. Then the computer flips a bunch of switches on (1) or off (0). Binary code is simply a series of 0s and 1s that state whether each individual switch is currently on or off. Each of these switches holds 1 bit of information: 0 or 1. Then these bits can be grouped into sets of eight, which is 1 byte of information. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required