Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Communication with computer

  1. Nov 16, 2011 #1
    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.
  2. jcsd
  3. Nov 16, 2011 #2


    User Avatar
    Science Advisor
    Gold Member

    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?
  4. Nov 16, 2011 #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:

  5. Nov 16, 2011 #4


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    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! :rofl:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook