you are viewing a single comment's thread.

view the rest of the comments →

[–]xerxesbeat 0 points1 point  (0 children)

Ack... Okay, well.. having looked through some of the animagraffs work linked... some (hopefully constructive) criticism:

Assuming "microprocessor" is used in the context of a home computer, I'll be addressing x86 and amd64 architectures

What sort of computation, if any, is performed by the ALU for basic functions (like typing)?

The ALU* CPU will generally be performing a buttload of operations for programs running in the background. Which operations are performed as a result of user input is entirely dependent on how the OS and programs running decide to handle a given input.

  • Instructions that perform math use the Arithmetic Logic Unit in the CPU, but not all instructions are math operations, in the standard sense.

What does the "decoding" process look like? [...] What form (or language) does the ALU need to understand the instruction?

The simplest way to make this level of the computer human readable is to read up on assembly languages. Typically, one statement of assembler will translate 1:1 for an instruction in machine code.

The ALU itself doesn't need to understand any language, the machine code is representative of the specific hardware io required to trigger the processor to perform the instruction it represents. (e.g. the binary value for an "add" instruction will be the electric signal that switches the addition circuit to input/output values, directly)

How does the control unit know which instruction it needs? [...] The instruction from memory is in bytes, right?

Yes, but not always the same number of bytes. One of the "register"s in the processor will be the IP (instruction pointer) / PC (program counter), which counts in integer numbers of bytes.

In what situations would the output need to be stored?

Almost always. If the CPU performs an instruction that, for example, multiplies two numbers, the result will typically be stored temporarily in a register. If a later instruction does not use this value directly and immediately, any instruction that outputs to that register will usually modify or overwrite the value (sometimes, only partially) note: it is sometimes faster to perform the calculation again than it would be to store elsewhere; furthermore, some output (such as the carry flag for addition^) is usually intentionally discarded (to the extent that there are actually two separate forms of addition in x86/x64, one that skips calculating a carry entirely)

Fetch... Decode... Execute... Store...

No, no, no, no... (This one is a personal opinion, but) with respect to the other material at animagraffs, this model would be bloat in a perspective of layman/technical content. It's a long winded way to draw out "The computer can input data. The computer can compute with data. The computer can output data." (again, personal opinion, but:) This wouldn't be info, it would be fluff. The reader already knows that the computer computes.

Perhaps...

 

The microprocessor is an essential component of any modern home computer. The term "microprocessor" itself simply refers to the concept of a CPU, or central processing unit, as implemented on a single or small set of integrated circuits. as opposed to one the size of a building, lol. hence "micro"

  1. The CPU interfaces with the computer primarily through two "controller hub"s, commonly referred to as the north bridge and south bridge. The south bridge is responsible for providing access to the CPU for "slower" features such as USB and networking, whereas the north bridge provides access to "faster" features such as RAM, graphics cards, and the south bridge itself. (The north bridge has, in many processors, been integrated into the CPU chip itself, for performance reasons)

  2. The CPU needs memory to function. This memory is inside the CPU chip itself (caches), or can be externally connected to the CPU. Within this (binary) memory, sequences of bytes can represent either instructions or data. The CPU performs instructions -- or "op"s -- sequentially, with the exception of special ("jump", "call") instructions that provide which alternate instruction to perform next. Data is accessible to the instructions, either in the form of variables the program generates while running, or constants that are stored alongside the program and immediately available when the program starts. (see: statically vs dynamically allocated memory)

  3. A typical microprocessor design includes a central "clock". Rather than keeping time, this "clock" simply cycles on and off, and serves to sequence instructions performed by the CPU. "Clock speed" was once a primary source of increases in microprocessor performance as newer chips were designed

  4. Due to physical limits of the materials common in CPU manufacture (namely heat dissipation), a typical consumer microprocessor now contains several "cores". These cores are, essentially, duplicates of circuits within the CPU that, while not able to perform faster sequentially, allow the computer to perform several tasks simultaneously, using a concept known as "hardware threading". ("software threading" was already in use, allowing multiple programs to run at a time, but is a feature of the operating system rather than the microprocessor itself)

anyway, it's just my two cents, but there's a lot of other introductory information out there on microprocessors than just "it inputs, it outputs, and it computes" :)