how does a computer program arrange transistors to run a program? In other words, if transistors are so small, how can a computer ever know how to create the circuit required to run a program?

856 views

how does a computer program arrange transistors to run a program? In other words, if transistors are so small, how can a computer ever know how to create the circuit required to run a program?

In: Technology

5 Answers

Anonymous 0 Comments

The transistors are hardware. That means they don’t change. They are hard wired, permanently. At it’s core, all a CPU can do is read data from memory, perform basic functions, and write to memory. Basic functions include Add, Subtract, Two’s compliment, increment, decrement, And, OR, XOR, one’s compliment, Arithmetic shift and logical shift.

When you write your code, that’s the human understandable code. Each command you run is broken down into multiple combinations of the basic functions listed above. Compiling a language means changing it into machine code – hard for a human to read, but required for the CPU to process.

That’s all a computer can do. Really, that’s it. It does not know how to draw an icon. It knows how to read an icon from a memory location and write it to another memory location that contains the contents of the screen. You type an “A”. that sends a code to a particular register (memory location), the CPU reads that code, and based on the machine code being run, either places a code representing an “A” at the current cursor position in memory, or moves your character one pixel to the left, or whatever.

It’s all stored in binary… ones and zeros. All math is done in binary. All graphics are stored in binary codes that indicate the color a particular pixel should show. All words, numbers, ideas, etc are stored in binary code. It’s all ones and zeros.

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