# Thread: How do computers work?

1. Im trying to sleep but a realization of something big I dont know is keeping me awake. How do computers work? At their core.

Here is what I think I know. Computers function through a series of electrical impulses, represented by 1s and 0s. 1 meaning electricity on, 0 meaning off. like Morse code. The longer the electricity is running, the more 1s result and vice versa. So 010 might mean the number 0, 0110 the number 1, 01110 the number 3 ecetera.

Bursts of impulses are then interpreted by the machine to light up certain patterns of pixels or somehow leave an imprint on a harddrive resulting in a data file. As more complicated tasks are desired coding languages are created to serve as shortcuts. With the first layer of code being whatever code allows typing like the letter 'L' to trigger the pattern of 1s and 0s to result in 'L'.

What has left me feeling confused is how exactly electrical impulses of varying durations can result in a different pattern of pixels lit up or data being written. It would have to be something mechanical. But I cannot concieve of what or how such a thing could be done.

So how does the mschine differentiate between the various impulse lengths to cause different effects?

Best I can think of Is that there maybe some kind of switchboard? Like maybe there are a number of switches (equal to the number of screen pixels the computer can handle*the number of possible combinations)+36, that get flipped in sequence as electricity is connected to them. So the longer the duration the more switches get flipped. And then there is a secondary impulse of electricity that flows in a direction determined by the number of switches flipped. Like towards screen pixels to light them or towards the harddrive to imprint it.

Problem is, that would require an absurd number of switches like millions. So its not really practical.

2.

3. Originally Posted by Humility
Im trying to sleep but a realization of something big I dont know is keeping me awake. How do computers work? At their core.

Here is what I think I know. Computers function through a series of electrical impulses, represented by 1s and 0s. 1 meaning electricity on, 0 meaning off. like Morse code. The longer the electricity is running, the more 1s result and vice versa. So 010 might mean the number 0, 0110 the number 1, 01110 the number 3 ecetera.

Bursts of impulses are then interpreted by the machine to light up certain patterns of pixels or somehow leave an imprint on a harddrive resulting in a data file. As more complicated tasks are desired coding languages are created to serve as shortcuts. With the first layer of code being whatever code allows typing like the letter 'L' to trigger the pattern of 1s and 0s to result in 'L'.

What has left me feeling confused is how exactly electrical impulses of varying durations can result in a different pattern of pixels lit up or data being written. It would have to be something mechanical. But I cannot concieve of what or how such a thing could be done.

So how does the mschine differentiate between the various impulse lengths to cause different effects?

Best I can think of Is that there maybe some kind of switchboard? Like maybe there are a number of switches (equal to the number of screen pixels the computer can handle*the number of possible combinations)+36, that get flipped in sequence as electricity is connected to them. So the longer the duration the more switches get flipped. And then there is a secondary impulse of electricity that flows in a direction determined by the number of switches flipped. Like towards screen pixels to light them or towards the harddrive to imprint it.

Problem is, that would require an absurd number of switches like millions. So its not really practical.
Your conception of how computers operate, (particularly how they use 1s and 0s to represent numbers) is incorrect. It has nothing to do with counting pulses. Instead, the each one or zero is a binary digit or "bit". Bits are grouped into 8 bit "bytes". A number is represented by the pattern of ones and zeros in a byte like thus:
00000000 =0
00000001=1
00000010=2
00000011=3
00000100=4
00000101=5
00000110=6
00000111=7
00001000=8
00001001=9

00001010=10 but when working with computers, it is generally designated A instead of ten. Following this example 11=B, 12=C, 13=D, 14=E, and 15=F.
that way, continuing on from 00001001 =9, you get

00001010=A
00001011=B
00001100=C
00001101=D
00001110=E
00001111=F

This can be continued all the way up to
11111111=FF= 255
Grouping bytes together can give you even larger numbers
FFFF = 65535 for example. This number system is called hexadecimal

There are other ways to use these bits to represent data. One is ASCII. This uses each byte to represent a character
Here
01100001 = a
01000001= A
00110001 = 1 (the character)

Yet another is binary-coded decimal(BCD). This uses the same code as hexadecimal for the numbers 0-9, but eliminates A-F
in BCD
0001000 =10
0001001=11
0001010=12
...
10011001=99
The first 4 bits represent the tens place and the second 4 bits the ones place of a two digit decimal number.

How a computer treats any byte depends on its instructions.

Computers generally work with these numbers in Byte-sized hunks. A 64 bit computer works with 8 bytes at a time. What this means is that when it is moving bytes around it does so with a 64 bit "bus", Think of a bus as a group of wires. An 8 bit bus would have 8 wires, each carrying 1 bit, a 64 bit bus would have 64 wires, etc.

Of course, when your computer communicates over the internet, it isn't doing it through 64 wire cables, It has to do it 1 bit at a time or serially. The information is still sent in bytes, with a string of 8 ones and zero representing one byte. There are communication protocols which tell your computer where one byte ends and anther begins.

Going into the detail of how a modern computer manipulates these bytes to display an image on your screen for example, would require explaining the operation of memory addresses, shift registers, decoders, etc, and is way too involved to get into here.

Suffice it to say that the color of any given pixel of your screen is saved in at a memory location, a different memory location for each pixel. This information is read and sent to the monitor so that it displays the proper color at the proper pixel. The memory locations are being constantly scanned at a high rate, so that the image on the screen can be constantly updated.

4. Ok, thank you. That makes sense.

5. I think Khan Academy has some resources on computer science.

6. Yeah I can confirm, they're very informative. Thanks for the explanation Janus.

7. Originally Posted by Humility
Im trying to sleep but a realization of something big I dont know is keeping me awake. How do computers work? At their core.

Here is what I think I know. Computers function through a series of electrical impulses, represented by 1s and 0s. 1 meaning electricity on, 0 meaning off. like Morse code. The longer the electricity is running, the more 1s result and vice versa. So 010 might mean the number 0, 0110 the number 1, 01110 the number 3 ecetera.

Bursts of impulses are then interpreted by the machine to light up certain patterns of pixels or somehow leave an imprint on a harddrive resulting in a data file. As more complicated tasks are desired coding languages are created to serve as shortcuts. With the first layer of code being whatever code allows typing like the letter 'L' to trigger the pattern of 1s and 0s to result in 'L'.

What has left me feeling confused is how exactly electrical impulses of varying durations can result in a different pattern of pixels lit up or data being written. It would have to be something mechanical. But I cannot concieve of what or how such a thing could be done.

So how does the mschine differentiate between the various impulse lengths to cause different effects?

Best I can think of Is that there maybe some kind of switchboard? Like maybe there are a number of switches (equal to the number of screen pixels the computer can handle*the number of possible combinations)+36, that get flipped in sequence as electricity is connected to them. So the longer the duration the more switches get flipped. And then there is a secondary impulse of electricity that flows in a direction determined by the number of switches flipped. Like towards screen pixels to light them or towards the harddrive to imprint it.

Problem is, that would require an absurd number of switches like millions. So its not really practical.
Google if then programming, the concept is pretty simple and computers work by doing millions of these commands per second

8. Janus your answer is excellent. Now, I get it it took 3 days to understand for me but, i get it finally. Thanks!

9. Originally Posted by Humility
Problem is, that would require an absurd number of switches like millions. So its not really practical.
Worth pointing out that there are billions of transistors (switches) in a modern processor.

10. My go to processor has 400 billion simiconductors. Theres no figuring on anything that size. Then there's the motherboard and all the communication devices. But I think I almost got it down. It's sort of like a tape recorder where the tape head, instead of stereo, has 128 channels all working at the same time. The tape goes around about 4 spindles then the tape head and then on out to the output tape. The spindles are the pointers and registers and the tape head is a controllable line adder. Now just add a whole other real of tape for the os programming and presto. It works for me so far.

11. Your understanding of how computers work is mostly correct. Computers function by processing electrical impulses, represented by 1s and 0s, which are known as binary codes which can be used to represent numbers, letters, and other characters. The way a computer interprets and processes these electrical impulses is through the use of transistors. A transistor is a semiconductor device that can be used to amplify or switch electronic signals. In a computer, transistors are used to create logic gates, which are the basic building blocks of digital circuits.
The pattern of 1s and 0s that are processed by the computer are stored in memory and passed to the processor, which interprets them as instructions. These instructions are then executed by the processor, which performs the necessary calculations and operations to complete the task.
Regarding the way the machine is able to differentiate between the various impulse lengths to cause different effects, you are correct that the processor uses a combination of logic gates and transistors to interpret the binary code and execute instructions. The processor has a clock that sends out pulses at a very high frequency, and the transistors in the processor switch on and off in response to these pulses, allowing the processor to perform the necessary calculations.
Regarding the way the machine can light up certain patterns of pixels or write data to a hard drive, the computer uses a graphics processing unit (GPU) or specialized memory chips to handle the display and storage respectively. The GPU interprets the instructions and uses the transistors to light up certain pixels on the display, while the memory chips stores data by changing the state of the transistors.

 Bookmarks
##### Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement