Computers and the Internet
Bits (binary digits)
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?
Computers typically store bits using electromechanical transistors which can map electrical signals to either an on or off state. Learn more in our article From electricity to bits or this video on how transistors work.
🙋🏽🙋🏻♀️🙋🏿♂️Do you have any questions about this topic? We'd love to answer— just ask in the questions area below!
Want to join the conversation?
- How does the computer know whether a binary pattern results in the display of a letter or number?(26 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.(38 votes)
- I didn't understand how 4 bits can represent 16 values.Could you please explain.Thanks(7 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.(13 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.(2 votes)
- How does a computer know how to display this information?(7 votes)
- 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.(6 votes)
- what are bits(4 votes)
- Bits are binary digits (0 and 1)(2 votes)
- chả hiểu gì cả(3 votes)
- why is this topic so complicated and stressful given the fact that i literally just found out about it today?(3 votes)
- why are bits used to represent everything?(2 votes)
- Computers only understand information when it is in binary or in binary digits (Bits): 0 and 1.
So all we do is converted to bits so the computer can understand.(2 votes)