How does a computer understand instructions and perform operations?

AI Thread Summary
Computers understand instructions by converting them into binary, which serves as a starting address for executing microcode instructions. Microcode acts as a machine language where each bit controls logic operations that manipulate data. The processor uses logic gates to determine which operations to perform based on the program code and data stored in registers. Each cycle, the processor loads instructions, processes data, and makes decisions on the next steps based on test results. Understanding modern computers requires recognizing their complexity and breaking down operations into manageable levels.
kingsarat
Messages
3
Reaction score
0
Hai,
I see many programming languages with instructions etc., and computer performing accordingly. Also, I hear computer converts the instructions into binary and it performs operations. Well, what I don't get is, even though it converts the instructions binary, how can it understand that it has to perform particular operation? All that computer has got is bunch of transistors and capacitors and some other hardware. How can it understand all numbers, instructions etc etc? If there any good books dealing with this basic subject please let me know.
 
Engineering news on Phys.org
To put you on the right track thinking-wise I will ask you a question: How does a mousetrap know how to catch a mouse?
 
The short of it is that the binary instruction value itself is used as a starting address of microcode instructions to execute. Although some computers (see RISC) run microcode or pseudo-microcode right out of main memory. Microcode is a kind of machine language where each bit in the instruction controls a logic operation that moves, stores, or processes data. That is, the bits themselves are connected to control pins of the different logic components.

This might be a good starting place:

http://en.wikipedia.org/wiki/Microcode
 
kingsarat said:
Hai,
I see many programming languages with instructions etc., and computer performing accordingly. Also, I hear computer converts the instructions into binary and it performs operations. Well, what I don't get is, even though it converts the instructions binary, how can it understand that it has to perform particular operation? All that computer has got is bunch of transistors and capacitors and some other hardware. How can it understand all numbers, instructions etc etc? If there any good books dealing with this basic subject please let me know.
It's a really clever system. Verrrrry Sipmply: The data that is held in the bit of memory that holds the program (the program code) is fed to the processor and becomes the input for a number of logic gates. These act as switches which control what operations the processor has to perform next. The data from another part of memory is fed into various places in the processor (called registers) and the program code controls what happens to the data in these registers.
The Processor Unit goes through a similar routine each cycle: it takes an instruction in, it loads registers and manipulates data. It also makes decisions (the really clever part of programming) that govern what it does next: it may just take the next instruction in its list or it may 'jump' to another instruction - depending upon the results of tests that it has done with data. But, again, what it does depends on the digital values in certain registers, which act as inputs to (literally) switching circuits.

The clever thing about the modern computer is that it takes data, stored in its memory or its mass storage and that data consists of control signals that determine what happens.

No one knows 'everything' about any of the modern computers any more. I think that the change occurred at round about the level of the BBC Micro. People had a chance of knowing pretty much all of the hardware operation and also the total operating system. Anything more complex and it just has to be a team - so don't feel bad about being flummoxed by just what goes on. Everyone is, to some extent. The secret is to split the thing into 'levels' and ignore the BS merchants who flaunt lots of buzzwords as if they know it all. They don't. The just know more than you do! :smile:
 
Very basic question. Consider a 3-terminal device with terminals say A,B,C. Kirchhoff Current Law (KCL) and Kirchhoff Voltage Law (KVL) establish two relationships between the 3 currents entering the terminals and the 3 terminal's voltage pairs respectively. So we have 2 equations in 6 unknowns. To proceed further we need two more (independent) equations in order to solve the circuit the 3-terminal device is connected to (basically one treats such a device as an unbalanced two-port...
suppose you have two capacitors with a 0.1 Farad value and 12 VDC rating. label these as A and B. label the terminals of each as 1 and 2. you also have a voltmeter with a 40 volt linear range for DC. you also have a 9 volt DC power supply fed by mains. you charge each capacitor to 9 volts with terminal 1 being - (negative) and terminal 2 being + (positive). you connect the voltmeter to terminal A2 and to terminal B1. does it read any voltage? can - of one capacitor discharge + of the...
Back
Top