Computers store information using bits. A bit (short for "binary digit") stores either the value or .
What fits in a bit?
A single bit can only represent two different values. That's not very much, but that's still enough to represent any two-valued state.
Is a lightbulb on or off?
A lightbulb that's off
A lightbulb that's on
Is a button enabled or disabled?
An enabled button that says "Submit"
A disabled button that says "Submit"
Is the current time AM or PM?
An alarm clock that says "9:35 AM"
An alarm clock that says "9:35 PM"
Check your understanding
Consider this settings screen for a Khan Academy user:
Screenshot of Khan Academy account setting screen with four settings: User name (a text field with the string "foxhound"), Birthdate (a date field with 7/10/1981), Primary language (a dropdown with "English" selected), Sound effects (a checked checkbox).
Which of the settings can be stored in a single bit?
Sequences of bits
Computers use multiple bits to represent data that is more complex than a simple on/off value.
A sequence of two bits can represent four () distinct values:
, , ,
A sequence of three bits can represent eight () different values:
, , , , , , ,
A sequence can represent many things: a number, a character, a pixel. Plus, the same sequence can represent different types of data in different contexts. The sequence could represent in a calculator application while also representing the letter "C" in a text file. Learn more in our lessons on Binary numbers and Storing text in binary
Check your understanding
How many different values can four bits represent?
Want to join the conversation?
- How does the computer know whether a binary pattern results in the display of a letter or number?(20 votes)
- You (or the compiler you use) have to explicitly tell the computer how to interpret a bit string.
So when you write code you'd have to specify "This is a character" or "This is a binary number", high level programming language have functions to make that easier.(31 votes)
- I didn't understand how 4 bits can represent 16 values.Could you please explain.Thanks(3 votes)
- If we have 4 bits and each can be one of two values, then the number of combinations one can make with 4 bits is equal to 2*2*2*2 = 2^4 = 16.(11 votes)
- "At11:47, what are electromechanical transistors?"(6 votes)
- it focuses on the interaction of electrical and mechanical systems as a whole and how the two systems interact with eachother.(1 vote)
- whenever i see computer specification there written
i always wonder what this means(3 votes)
- 32 bit and 64 bit refer to the addressable memory. A 32 bit computer can only use about 4 GB of RAM, whereas a 64 bit computer can use about 16 exabytes of RAM. 64 bit computers can often do more calculations per second, so they are faster.(6 votes)
- How do just two numbers make up an entire device(2 votes)
- Computers can't understand statements or requests like "Please put the picture of dogs on the top right page of the screen". For computers, it's total gibberish. The best way for computers to understand our requests are by the most simple types of questions possible - YES or NO. 1's and 0's simply respond to the computer asking "Does variable x = y?". So whatever question the computer asks, we can say YES or NO, 1 or 0. These questions can range from anything from "what is this letter" to "where is this item's coordinates". At the end of the day, computers just run on "should I do this", numerous times.(5 votes)
- So for 1 bit, this can only represent two different values. So is the current day of the week part of that or would it be multiple values?(2 votes)
- There are seven days in a week, so we would need at least 3 bits to represent a specific day. (3 bits = 2^3 combinations)(2 votes)