How does a computer understand instructions and perform operations?

In summary, computers understand binary numbers and can perform specific operations based on them by interpreting the instructions.
  • #1
kingsarat
3
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
  • #2
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?
 
  • #3
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
 
  • #4
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:
 

Related to How does a computer understand instructions and perform operations?

What is communication with computer?

Communication with computer refers to the process of exchanging information or data between a human and a computer system. This can include inputting commands or data, receiving output or responses, and interacting with the computer through various devices or interfaces.

How does a computer communicate with a human?

A computer can communicate with a human through a variety of methods, such as visual displays, audio output, and tactile feedback. The most common form of communication is through a graphical user interface (GUI) where users can interact with the computer using a mouse, keyboard, or touch screen.

What are the different types of computer communication?

There are several types of computer communication, including wired and wireless communication. Wired communication involves physical connections, such as USB cables or Ethernet cables, while wireless communication uses radio waves or infrared signals to transmit data. Other types include serial and parallel communication, which differ in the way data is transmitted between devices.

What are the components of computer communication?

The main components of computer communication include a sender (the human or device initiating the communication), a receiver (the device that receives the communication), a medium (the physical or virtual channel through which data is transmitted), and a protocol (a set of rules that governs the communication process).

What are some common challenges in computer communication?

Some common challenges in computer communication include data loss, errors in transmission, compatibility issues, and security threats. As technology advances and more devices are connected, ensuring efficient and secure communication between them becomes increasingly important.

Similar threads

Replies
1
Views
967
Replies
14
Views
3K
  • Computing and Technology
Replies
13
Views
2K
  • Programming and Computer Science
Replies
29
Views
2K
Replies
8
Views
1K
  • Programming and Computer Science
Replies
18
Views
2K
  • Quantum Physics
Replies
8
Views
1K
  • Programming and Computer Science
Replies
29
Views
3K
  • Computing and Technology
Replies
10
Views
2K
Replies
8
Views
1K
Back
Top