How do computers understand bits?

In summary: That led to the development of the microprocessor.In summary, -Logic gates are used to process binary information, which is understood by the CPU-Electronics understand and process bits at a lower level using gates and integrated circuits-The microprocessor was created to handle more complex tasks and controls systems
  • #1
ISamson
Gold Member
438
151
Hello.
How do computers and electronics understand bit signals and information? how do they process it?
I know that a bit consists of ons and offs, but how does the computer understand this and what to do with it??
Is there something I don't understand?:smile:
Thank you.
 
Technology news on Phys.org
  • #2
Understand is probably not the right word.

If you want to learn how computers work at the lowest levels there are many books and videos to help you. Just asking questions here is not the best strategy to learn.

The first video below is most basic. It focuses on a single logic gate with transistors. That illustrates the two-state nature that we call a bit. The second video talks about how we make many gates into a computer.



 
  • Like
Likes ISamson, OmCheeto and jedishrfu
  • #3
This doesn't really tell you how computers work, but it should change the way you think about it: How does a mousetrap know how to catch a mouse? Same thing. We accept that the mousetrap doesn't really 'know' and that it is just a machine.
 
  • Like
Likes FactChecker
  • #4
Averagesupernova said:
This doesn't really tell you how computers work, but it should change the way you think about it: How does a mousetrap know how to catch a mouse? Same thing. We accept that the mousetrap doesn't really 'know' and that it is just a machine.

But a mousetrap is mechanical, a computer is more... electronic. It does not have any bolts or wood planks inside the CPU.
Does it?

anorlunda said:
books

For example?
 
  • #5
ISamson said:
But a mousetrap is mechanical, a computer is more... electronic. It does not have any bolts or wood planks inside the CPU.
Does it?
No of course not. That really does not have anything to do with the question. The point is that a very well understood machine such as a mousetrap doesn't 'know' anything. Is it really relevant that a mousetrap is mechanical and a microprocessor inside a computer is not mechanical?
 
Last edited:
  • #6
Averagesupernova said:
microprocessor inside a computer is not mechanical?

Well, not really.
 
  • #8
You might take a look at Ken Shrriff's blog post describing how an ARM1 processor works, or this visual transistor-level simulation of what goes on within a 6502 CPU.
6502 processors powered the Apple II and Commodore VIC-20, and it's slightly more capable cousin the 6510 was under the hood of Commodore's C-64 computer
 
  • Like
Likes ISamson
  • #9
Asymptotic said:
You might take a look at Ken Shrriff's blog post describing how an ARM1 processor works, or this visual transistor-level simulation of what goes on within a 6502 CPU.
6502 processors powered the Apple II and Commodore VIC-20, and it's slightly more capable cousin the 6510 was under the hood of Commodore's C-64 computer

Thank you. I like it.
 
  • #10
Asymptotic said:
You might take a look at Ken Shrriff's blog post describing how an ARM1 processor works, or this visual transistor-level simulation of what goes on within a 6502 CPU.
6502 processors powered the Apple II and Commodore VIC-20, and it's slightly more capable cousin the 6510 was under the hood of Commodore's C-64 computer

Thank you very much @Asymptotic . I used to LOVE programming the 6502 in machine language. My first big software project was a training simulator (akin to flight simulators) using a General Electric GEPAC 4020 computer. That was 1967. I learned that machine to black belt level. 10 years later I bought a Commodore Pet, and after that an Apple ][ and I was delighted to find that the instruction set of the 6502 was nearly identical to that old GEPAC (except 8 bits wide rather than the GEPAC's 24). That 6502 simulator looks like lots of fun.

I wonder why the 6502 inspires so many more warm feelings than other chip designs. (Uh oh, I don't mean to hijack this thread. If anyone wants to discuss that, let's start a new thread.)
 
  • #11
ISamson said:
Hello.
How do computers and electronics understand bit signals and information? how do they process it?
I know that a bit consists of ons and offs, but how does the computer understand this and what to do with it??
Is there something I don't understand?:smile:
Thank you.

At the most basic level, as already noted, there is the concept of logic gate. With combinations and arrays of such gates(like and, or, nor, xor etc.) series of 0s and 1s (e.g. bytes, words) can be transferred and processed by the CPU, using memory and storage devices. Now, at the electronics level, there is a lot going on to get this function properly(levels of voltage at various components, levels of input - output signals etc.). At a more abstract level, i.e. a level closer to the user of the machine, comes the idea of the operating system. Back in the old days - there are way more experienced people here to talk about this in more detail than me although I do have some experience as well, there were wires, switches and panels with bulbs in order to insert data and process it (switches later became electromechanical structures (relays)) (first generation), then vacuum tubes were used as the basic circuitry for memory and CPU (second generation). Later, transistors were used and SSI, MSI, LSI integrated circuits (third generation) and later VLSI integrated circuits (fourth generation), as a very brief description - for more info you can take a look at Wikipedia for instance. At some point the need arose to have some system to control the hardware and the various tasks to be performed, so the notion of an operating system came into being. The OS manages hardware resources, provides services for accessing those resources and creates higher - level abstractions such as files, directories and processes. It is also the platform on which application and system programs run and it is an extension of the machine or in other words, what a user realizes as machine at the logical level. So, the OS has its very important role in the management / processing data bits as useful information, concerning the interaction between user and machine.

I would also like to point out that the notion of 0s and 1s takes various forms inside a computer: it can be that there is flow of current or not at some component, that something is magnetized or not and in general various things that can only take one of two values.
 
Last edited:
  • Like
Likes ISamson
  • #12
Can something MECHANICAL or HYDRODYNAMIC be used instead of something that is electrical or electronic?
 
  • #13
symbolipoint said:
Can something MECHANICAL or HYDRODYNAMIC be used instead of something that is electrical or electronic?
Sure. The example I can think of is an automatic transmission in a vehicle. Nowadays they are controlled electronically but years ago when to shift gears and whether to upshift or downshift was all determined by mechanical devices in the transmission.
 
  • #14
Averagesupernova said:
Sure. The example I can think of is an automatic transmission in a vehicle. Nowadays they are controlled electronically but years ago when to shift gears and whether to upshift or downshift was all determined by mechanical devices in the transmission.
I really have no idea how automatic transmission works.
 
  • #15
symbolipoint said:
Can something MECHANICAL or HYDRODYNAMIC be used instead of something that is electrical or electronic?
Google Charles Babbage and his difference engine
 
  • Like
Likes QuantumQuest
  • #16
Averagesupernova said:
Sure. The example I can think of is an automatic transmission in a vehicle. Nowadays they are controlled electronically but years ago when to shift gears and whether to upshift or downshift was all determined by mechanical devices in the transmission.
Both mechanical and hydraulic. The programming for "classic" automatic transmissions were "hydrodynamic" valve bodies. Scroll down this web page to see a cutout of a valve body:

http://www.carparts.com/transmission.htm

6502

In addition to Apple II and Commodore 64, the Atari 400/800/65XE/130X3 also ran on 6502 but twice as fast at 2 mega-hertz.
 
  • #17
symbolipoint said:
Can something MECHANICAL or HYDRODYNAMIC be used instead of something that is electrical or electronic?
Indeed. One of my dreams, if ever I attain immortality, and so have plenty of time, is to build a goldfish computer.

Every bit is manifest as a tiny tank with a gate that divides it in half (0 and 1). The goldfish lives on one side of the tank or the other, depending on whether that bit is set or unset. I control (set/unset) the goldfish with food pellets.

I'm still working on the logic gates. One of the nice things to know is that you only need to create one type of logic gate: the NAND. You can create all other types of gates (albeit not very efficiently) by combining NAND gates the right way.
 
  • Like
Likes sysprog, donpacino and ISamson
  • #18
symbolipoint said:
Can something MECHANICAL or HYDRODYNAMIC be used instead of something that is electrical or electronic?
When I was a kid I had one of these, a small mechanical digital computer, a collection of sliding plastic plates and rods linked with rubber bands:

https://en.m.wikipedia.org/wiki/Digi-Comp_I
 
Last edited:
  • Like
Likes ChrisVer
  • #19
We had one of these:

addiator.jpg
 

Attachments

  • addiator.jpg
    addiator.jpg
    34.8 KB · Views: 723
  • Like
Likes sysprog and ChrisVer
  • #20
symbolipoint said:
Can something MECHANICAL or HYDRODYNAMIC be used instead of something that is electrical or electronic?
There's this game, called Dwarf Fortress.
At its most basic, it's about base-building (think Moria in Lord of the Rings) with no clear goals, so a sandbox. Now, it emulates a rather large number of real-life interactions, including some basic fluid behaviour (water or magma), machinery (levers, gears, pressure plates, Indiana Jones-style traps), animal behaviour, etc.

Using this sandbox, people have been building computing machines, including a calculator, a hardware-based space invaders clone, and a fully-programmable computer, or two. These contraptions can use animal-based logic similar to what @DaveC426913 envisioned, or water/magma/mine carts serving the same purpose as electricity.

There is something very human about building a computer inside a computer, using parts that were not meant for it, and for no other reason than having too much free time on one's hands.

You can read more about those here:
http://dwarffortresswiki.org/index.php/DF2014:Computing
and in the links to specific creations at the bottom.
Although, understanding the finer points might require a rare skill set of having not only a CS degree, but also a working knowledge of the rather arcane game mechanics and its obscure, ASCII-based user interface.
 
  • #21
ISamson said:
But a mousetrap is mechanical, a computer is more... electronic. It does not have any bolts or wood planks inside the CPU.
Does it?
No, of course. But it could : it's possible to construct a purely mechanichal logical gate. So you can imagine a purely mechanical computer.
We can't really construct one because it would require billions of mobile parts an it would be much much slower than an electronical one.

Indeed, the first logical machines were mechanical.
 
  • #22
Chanur said:
We can't really construct one because it would require billions of mobile parts an it would be much much slower than an electronical one.
We can, it would just be inefficient.

A computer can be as simple as you like.Often, they're simply adding machines. This is within feasability.

You'd build it for the kicks and geek cred, not for practicality.

Some yahoo built a fully working computer within the Minecraft game. It is a word processor, calculator and day/night controller all in one.
 
  • Like
Likes anorlunda
  • #23
Circuitry for calculating the carry when two one-bit quantities are added - three AND gates and one OR gate, wired as shown. The part for doing the actual addition isn't shown, but is very simple -- just an XOR gate with three inputs: a, b, and the CarryIn value.
1bitAdder.png


@DaveC426913, good luck in implementing this with goldfish!
 

Attachments

  • 1bitAdder.png
    1bitAdder.png
    5.8 KB · Views: 713
Last edited:
  • #24
One can argue that machines like the ones in the pictures were mechanical computers. At one point, they were ubiquitous. The first one had a hand crank. The second one had electric motors to spin things.

b00e0c49be6f3f40aac1b0cc632954c4--mechanical-calculator-geek-things.jpg

610a0f9e44cb6e2f8f3b01fcf4c51dcd.jpg
 

Attachments

  • b00e0c49be6f3f40aac1b0cc632954c4--mechanical-calculator-geek-things.jpg
    b00e0c49be6f3f40aac1b0cc632954c4--mechanical-calculator-geek-things.jpg
    43.6 KB · Views: 684
  • 610a0f9e44cb6e2f8f3b01fcf4c51dcd.jpg
    610a0f9e44cb6e2f8f3b01fcf4c51dcd.jpg
    98.5 KB · Views: 751
  • #25
I remember those. They, and their brethren the Friden amd Marchant calculators, had a quirk. When you told them to divide by Zero, they would at least try. That is they would happily run to destruction trying to get an answer. You had to pull the power cord and call the Field Service Engineer to come out and clear them. Now we have come a 'long way', all you have to do is 'reboot'.:smile:
anorlunda said:
610a0f9e44cb6e2f8f3b01fcf4c51dcd-jpg.jpg
 

Attachments

  • 610a0f9e44cb6e2f8f3b01fcf4c51dcd-jpg.jpg
    610a0f9e44cb6e2f8f3b01fcf4c51dcd-jpg.jpg
    98.5 KB · Views: 621
  • Like
Likes anorlunda
  • #26
This video may help.



It goes through some electronic circuits, shows how bits "0" "and "1" correspond to voltages, and shows those voltages on a test instrument called an oscilloscope. In the process he shows how to connect a temperature sensor to a small computer called an Arduino.

In this case "0" corresponds to zero volts, and "1" corresponds to 3 to 5 volts.
 
  • Like
Likes anorlunda
  • #27
symbolipoint said:
Can something MECHANICAL or HYDRODYNAMIC be used instead of something that is electrical or electronic?

What about a computer made of water droplets?

 
  • #28
ISamson said:
Hello.
How do computers and electronics understand bit signals and information? how do they process it?
I know that a bit consists of ons and offs, but how does the computer understand this and what to do with it??
Is there something I don't understand?:smile:
Thank you.
The concept of a 'bit' is a bit vague. There are mechanical computers, electronic computers, hydromechanical computers, analog computers, digital computers, and even biological computers.

In the simplest of terms a 'bit' is literally a single object that can contain one of two states. This can be a transistor's conductive state, the position of a mechanical device such as a switch, the temperature of a room being above a given value, the numerical terms "1" and "0", the logical terms "true" and "false", the presence or absence of a hole in a piece of paper, or the polarity of a magnetic recording at a particular position on some magnetic media.

Digital computers are built a lot like a simple washing machine timer. They simply fetch a byte from memory and 'execute' it. The bits in that byte (which in electronic computers is stored as charges in capacitors or as transistor conductivity states, only have a meaning because of the logic in the processor that effectively interprets those bits to cycle the various gates and latches to move other bits from one place to another.

In other words, what a 'bit' means is strictly up to the programmer, that assigned that 'bit' some kind of meaning. It is the same with any byte value (8 bits), or for any grouping of bits (words). A byte may mean a number, for example, or a letter in a telegraph code such as the American Standard Code for Information Interchange (ASCII) or the UTF-8 telegraph code. It could means you passed through a door in a video game. It could mean an instruction in the processor itself.
 
  • Like
Likes ISamson
  • #29
ISamson said:
Hello.
How do computers and electronics understand bit signals and information? how do they process it?
I know that a bit consists of ons and offs, but how does the computer understand this and what to do with it??
Is there something I don't understand?:smile:
Thank you.
It is like learning to write, we see a word and we try to remember how to spell it when we hear the word spoken. A CPU/electronic gate, does much of the same. We input a stimulus/voltage to a gate and depending on the other gates it outputs another set of voltages. The one thing that does not exist is homonyms, there are only a finite set of instructions(spellings) that create a finite outputs. It's much like a magic decoder ring.(I am dating myself).
 
  • #30
In case anyone is interested, the first Turing-complete electromechanical computer (the bits are the states of relays, not voltages stored in flip-flops) was built by Konrad Zuse in Germany during the 1940s. It's pretty incredible.

https://en.wikipedia.org/wiki/Z3_(computer)
 
  • #31
ISamson said:
Hello.
How do computers and electronics understand bit signals and information? how do they process it?
I know that a bit consists of ons and offs, but how does the computer understand this and what to do with it??
Is there something I don't understand?:smile:
Thank you.
I'm sure you know that computers and electronics don't actually understand bit signals and information, they respond to signals and generate signals, and they accept, process, and report information. Colloquially, they made be said to "know" or "understand", but such usage of human knowledge and reasoning terms as that are conveniences for our own understanding. We may say that Google knows everything (including many things that are not true) but in reality, only we (and perhaps other sentient beings, epistemic questions aside) can properly be said have knowledge.

"How", interpreted as "in what or which way" computers process information, depends on the processor architecture, and on the process specification (the program) that it is given by which to process it. (Please note that the word "process" is in that sentence used both as a noun and a verb.) "How", interpreted as "by what internal mechanism", in modern electronic computers, is by semiconductor switching circuits, arrays of interrogable and switchable (readable and writeable) memory devices, and communication mechanisms.

Your questions, if interpreted liberally, bring up multiple fields of study and endeavor.

A rudimentary non-electronic digital computer apparatus is the abacus. It's not a computer by itself, because its operator is required to interpret the program and perform the mechanical actions, but it does passively hold sequences of digital memory states. If you watch a video of someone extracting 4 digits of the square root of 2, you can see elements that are present in every digital computer. The position of the beads is the state of the memory. The manipulation of the beads is the processing. The person doing the manipulation is the processor. The rules the person is following constitute the program. The problem he is trying to solve is the input to the program. The result read as the solution is the output from the program.

You can download an abacus for windows here: http://www.softpedia.com/get/Others/Home-Education/Soroban.shtml

Soroban_1.png
 

Attachments

  • Soroban_1.png
    Soroban_1.png
    26.1 KB · Views: 408

1. What are bits and how do they relate to computers?

Bits are the most basic unit of information in a computer. They are represented by either a 0 or a 1, and are used to store and process data in a computer. Each bit has a specific meaning and is combined with other bits to represent more complex data.

2. How do computers interpret bits?

Computers interpret bits using a binary system, where each bit has a value of either 0 or 1. The computer's hardware and software are designed to read and process these values, allowing it to perform tasks and store information.

3. How do bits form larger units of data?

Bits are combined to form larger units of data, such as bytes, kilobytes, and megabytes. For example, 8 bits make up 1 byte, and 1,000 bytes make up 1 kilobyte. These larger units are used to measure the amount of data stored in a computer or transferred over a network.

4. How do computers convert bits into images, videos, and other media?

Computers use algorithms and software to convert bits into images, videos, and other media. These algorithms interpret the bits and convert them into pixels, colors, and other visual elements that make up the media.

5. How do computers handle errors in bits?

Computers have error detection and correction mechanisms in place to handle errors in bits. These mechanisms use mathematical algorithms to check for errors and correct them if necessary. This ensures that the data being processed and stored by the computer is accurate and reliable.

Similar threads

  • Programming and Computer Science
Replies
2
Views
1K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
  • Programming and Computer Science
Replies
10
Views
3K
  • Programming and Computer Science
Replies
32
Views
1K
Replies
2
Views
798
  • Programming and Computer Science
Replies
4
Views
653
  • Programming and Computer Science
Replies
7
Views
1K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
9
Views
2K
  • Programming and Computer Science
Replies
6
Views
1K
Back
Top