how do commands on a screen direct electrical currents in a computer?

202 views

I’m not asking what computer code is. I’m asking how typing in commands physically opens/closes the little switches in computers?

In: 2

7 Answers

Anonymous 0 Comments

the code you see on the screen is just the electronics of the computer representing for you what some of those little switches are in the particular part of memory. so you might have 101110001000001010101 in memory and the program currently running might instruct the computer to send a representation of that data to the video card and from their to the screen, until you end up with (say) “input” on the display.

i say all this to highlight that it’s the data in memory that the computer works with and drives everything.

now the user might “compile” the program they’re working on which, depending on the language, might change the human readable code that was being worked on in the program editor into individual binary codes that the CPU was designed to work with. it’s this binary code that’s stored and run when you run a program.

really the 1’s and 0’s of that compiles program are just sets of switches that the CPU reacts to in really really realllly complicated ways.

for example (big simplification), sending
00000001 (the number one)
00000011 (the number three)
01110110 (made up code for “add”)

to the CPU might cause it’s switches to react such that 00000100 is presented on the output (and this happens to represent the number 4)

this is a gross simplification, but i put it like this just to point out that really everything the computer does is just different parts of it responding to the switches set in the input data

note: all example numbers / commands totally made up

to get a bit of intuition on how complex behaviour can boil down to switches – [see something like Turing Tower in action on youtube](https://www.youtube.com/watch?v=1aOQMcYubl8), it’s a game where you build logical operations (and even some number calculations) using just plastic switches and marbles that tumble through them

You are viewing 1 out of 7 answers, click here to view all answers.