Saturday, July 24, 2010

(AUL) Arithmetic logic unit of CPU

[close]
Hide
Wikipedia is getting a new lookHelp us find bugs and complete user interface translations
Notice something different? We've made a few improvements to Wikipedia. Learn more. [Hide]
[Help us with translations!]
Arithmetic logic unit
From Wikipedia, the free encyclopedia
Jump to: navigation, search
Arithmetic Logic Unit schematic symbol
Cascadable 8 Bit ALU Texas Instruments SN74AS888

In computing, an arithmetic logic unit (ALU) is a digital circuit that performs arithmetic and logical operations. The ALU is a fundamental building block of the central processing unit (CPU) of a computer, and even the simplest microprocessors contain one for purposes such as maintaining timers. The processors found inside modern CPUs and graphics processing units (GPUs) accommodate very powerful and very complex ALUs; a single component may contain a number of ALUs.

Mathematician John von Neumann proposed the ALU concept in 1945, when he wrote a report on the foundations for a new computer called the EDVAC. Research into ALUs remains an important part of computer science, falling under Arithmetic and logic structures in the ACM Computing Classification System.
Contents
[hide]

* 1 Early development
* 2 Numerical systems
* 3 Practical overview
o 3.1 Simple operations
o 3.2 Complex operations
o 3.3 Inputs and outputs
o 3.4 ALUs vs. FPUs
* 4 See also
* 5 Notes
* 6 References
* 7 External links

[edit] Early development

In 1946, von Neumann worked with his colleagues in designing a computer for the Institute for Advanced Study (IAS) in Princeton, New Jersey. The IAS computer became the prototype for many later computers. In the proposal, von Neumann outlined what he believed would be needed in his machine, including an ALU.

von Neumann stated that an ALU is a necessity for a computer because it is guaranteed that a computer will have to compute basic mathematical operations, including addition, subtraction, multiplication, and division. He therefore believed it was "reasonable that [the computer] should contain specialized organs for these operations".
[edit] Numerical systems

An ALU must process numbers using the same format as the rest of the digital circuit. The format of modern processors is almost always the two's complement binary number representation. Early computers used a wide variety of number systems, including one's complement, sign-magnitude format, and even true decimal systems, with ten tubes per digit.

ALUs for each one of these numeric systems had different designs, and that influenced the current preference for two's complement, as this is the representation that makes it easier for the ALUs to calculate additions and subtractions.[citation needed]

The two's-complement number system allows for subtraction to be accomplished by adding the negative of a number in a very simple way which negates the need for specialised circuits to do subtraction.
[edit] Practical overview

Most of a processor's operations are performed by one or more ALUs. An ALU loads data from input registers, an external Control Unit then tells the ALU what operation to perform on that data, and then the ALU stores its result into an output register. Other mechanisms move data between these registers and memory.
[edit] Simple operations
A simple example arithmetic logic unit (2-bit ALU) that does AND, OR, XOR, and addition

Most ALUs can perform the following operations:

* Integer arithmetic operations (addition, subtraction, and sometimes multiplication and division, though this is more expensive)
* Bitwise logic operations (AND, NOT, OR, XOR)
* Bit-shifting operations (shifting or rotating a word by a specified number of bits to the left or right, with or without sign extension). Shifts can be interpreted as multiplications by 2 and divisions by 2.

[edit] Complex operations

An engineer can design an ALU to calculate any operation, however complicated it is; the problem is that the more complex the operation, the more expensive the ALU is, the more space it uses in the processor, and the more power it dissipates, etc.

Therefore, engineers always calculate a compromise, to provide for the processor (or other circuits) an ALU powerful enough to make the processor fast, but yet not so complex as to become prohibitive. Imagine that you need to calculate the square root of a number; the digital engineer will examine the following options to implement this operation:

1. Design an extraordinarily complex ALU that calculates the square root of any number in a single step. This is called calculation in a single clock.
2. Design a very complex ALU that calculates the square root of any number in several steps. But the intermediate results go through a series of circuits that are arranged in a line, like a factory production line. That makes the ALU capable of accepting new numbers to calculate even before finished calculating the previous ones. That makes the ALU able to produce numbers as fast as a single-clock ALU, although the results start to flow out of the ALU only after an initial delay. This is called calculation pipeline.
3. Design a complex ALU that calculates the square root through several steps. This is called interactive calculation, and usually relies on control from a complex control unit with built-in microcode.
4. Design a simple ALU in the processor, and sell a separate specialized and costly processor that the customer can install just beside this one, and implements one of the options above. This is called the co-processor.
5. Tell the programmers that there is no co-processor and there is no emulation, so they will have to write their own algorithms to calculate square roots by software. This is performed by software libraries.
6. Emulate the existence of the co-processor, that is, whenever a program attempts to perform the square root calculation, make the processor check if there is a co-processor present and use it if there is one; if there isn't one, interrupt the processing of the program and invoke the operating system to perform the square root calculation through some software algorithm. This is called software emulation.

The options above go from the fastest and most expensive one to the slowest and least expensive one. Therefore, while even the simplest computer can calculate the most complicated formula, the simplest computers will usually take a long time doing that because of the several steps for calculating the formula.

Powerful processors like the Intel Core and AMD64 implement option #1 for several simple operations, #2 for the most common complex operations and #3 for the extremely complex operations. That is possible by the ability of building very complex ALUs in these processors.
[edit] Inputs and outputs

The inputs to the ALU are the data to be operated on (called operands) and a code from the control unit indicating which operation to perform. Its output is the result of the computation.

In many designs the ALU also takes or generates as inputs or outputs a set of condition codes from or to a status register. These codes are used to indicate cases such as carry-in or carry-out, overflow, divide-by-zero, etc.
[edit] ALUs vs. FPUs

A Floating Point Unit also performs arithmetic operations between two values, but they do so for numbers in floating point representation, which is much more complicated than the two's complement representation used in a typical ALU. In order to do these calculations, a FPU has several complex circuits built-in, including some internal ALUs.

Usually engineers call an ALU the circuit that performs arithmetic operations in integer formats (like two's complement and BCD), while the circuits that calculate on more complex formats like floating point, complex numbers, etc. usually receive a more illustrious name.
[edit] See also

* 7400 series
* 74181
* adder (electronics)
* multiplication ALU
* digital circuit
* division (electronics)
* Control Unit

[edit] Notes
[edit] References

* Hwang, Enoch (2006). Digital Logic and Microprocessor Design with VHDL. Thomson. ISBN 0-534-46593-5. http://faculty.lasierra.edu/~ehwang/digitaldesign.
* Stallings, William (2006). Computer Organization & Architecture: Designing for Performance 7th ed. Pearson Prentice Hall. ISBN 0-13-185644-8. http://williamstallings.com/COA/COA7e.html.

[edit] External links

* A Simulator of Complex ALU in MATLAB

kissa vianne s. celeste
Retrieved from "http://en.wikipedia.org/wiki/Arithmetic_logic_unit"
Categories: Digital circuits | Central processing unit | Computer arithmetic
Hidden categories: All articles with unsourced statements | Articles with unsourced statements from October 2007
Personal tools

* New features
* Log in / create account

Namespaces

* Article
* Discussion

Variants

Views

* Read
* Edit
* View history

Actions

Search
Search
Navigation

* Main page
* Contents
* Featured content
* Current events
* Random article

Interaction

* About Wikipedia
* Community portal
* Recent changes
* Contact Wikipedia
* Donate to Wikipedia
* Help

Toolbox

* What links here
* Related changes
* Upload file
* Special pages
* Permanent link
* Cite this page

Print/export

* Create a book
* Download as PDF
* Printable version

Languages

* العربية
* Català
* Česky
* Deutsch
* Eesti
* Ελληνικά
* Español
* Euskara
* فارسی
* Français
* Galego
* 한국어
* Bahasa Indonesia
* Italiano
* עברית
* Latviešu
* Lëtzebuergesch
* Magyar
* Nederlands
* 日本語
* ‪Norsk (bokmål)‬
* Polski
* Português
* Română
* Русский
* Shqip
* Simple English
* Slovenčina
* Svenska
* ไทย
* Türkçe
* 中文

* This page was last modified on 4 July 2010 at 15:04.
* Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. See Terms of Use for details.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
* Contact us

* Privacy policy
* About Wikipedia
* Disclaimers

* Powered by MediaWiki
* Wikimedia Foundation

COMPUTER BASICS System Unit

A computer system unit contains many parts.





Motherboard - The motherboard is the main circuit board of a microcomputer. It is also known as the mainboard or system board.
CPU - The CPU is the central electronic chip that determines the processing power of the computer.
Memory - Memory is the part of the computer that temporarily stores applications, documents, and stem operating information.
Bus - A bus is an electronic line that allows 1s and 0s to move from one place to another.
Expansion Slots - Expansions slots appear on the motherboard. They are sockets into which adapters are connected.
Ports and Connectors - A port is a connector located on the motherboard or on a separate adapter.
Bays - A bay is a space inside the computer case where a hard drive, floppy drive or CD-ROM drive sits
Power Supply - A power supply changes normal household electricity into electricity that a computer can use.
Sound Components - A sound card lets a computer play and record high quality sound.





Central Processing Unit (CPU)








Does all of the work for the computer

    1. Does all of the mathematics, mainly addition
    2. Does all the logical comparisons of values
    3. Directs the flow of data in a computer
    4. Controls the operation of the parts of the computer



    Today, all CPUs are microprocessors

    1. A microprocessor is a complete computer on a silicon chip
    2. A microprocessor does all of the functions of a computer
      • stores data and instructions waiting to be used
      • follows changeable instructions
      • does input, processing, and output



    CPUs have three basic parts

    1. The Arithmetic Logic Unit (ALU)
      • does all of the mathematics in a computer
      • does all of the logic comparisons of values
      • some common logic comparison symbols
        • = equal to
        • <>
        • > greater than
        • <= less than or equal to
        • >= greater than or equal to
        • <> not equal



    2. The Control Unit
      • directs the flow of information into the CPU and/or memory or storage
      • controls which instructions the CPU will do next



    3. Registers
      • Used to store data and instructions inside the processor
      • Size of the registers can affect the speed and performance of the processor



    Speed of CPUs

    1. The speed of CPUs is measured in hertzs.
      • A hertz is on cycle per second.
      • Need to measure time to determine cycles per second
        • All computers have a clock built into them for timing the cycles
        • The clock is usually located in a small metal box on the motherboard.
      • Today, many CPUs can complete over six (6) instructions per second.



    2. Speeds of modern CPUs
      • Most computers have a CPU that can do more than 400 MHz.
        • MHz stands for megahertzs
        • A MHz is 1,000,000 cycles per second.
      • Computers will soon be at speeds of over a gigahertz, 1,000,000,000 Hertzs.

Memory

Primary memory can be used directly by the CPU

  1. Consists of silicon chips, usually either VLS or VLSI technology is used to create the chips
  2. Two forms of Primary Memory
    • Read Only Memory (ROM)
    • Random Access Memory (RAM)
  3. Primary memory is also called primary storage

Read Only Memory (ROM)





  1. Stores instructions that are used by the CPU
    • Tells the CPU how to be the kind of computer it is, for example a Windows, Macintosh, or Play Station computers.
    • Tells the CPU how to work with the different parts of the computer
    • ROM can also hold programs that are directly accessed by the CPU. One such program is the self-test when the computer is first turned on. The self-test tests to seem if all the parts on the main circuit board (mother board) are working correctly.
  2. The instructions in ROM can not usually be changed
    • The instructions are built into the electronic circuits of the chips
    • These instructions in ROM are called firmware
    • To change the instructions in ROM you need to usually change the chips or do some other special process that is normally not available to an average user.
  3. The instructions in ROM are nonvolatile. They stay in ROM even when the computer is turned off.
  4. Access to information is random access.
    • Random access means that any piece of information in ROM can be accessed at any given time without access other information first. It is a lot like the tracks on a music CD. You can access any track at any time and in any order.
    • The other kind of access is sequential access. You must access the information in the order that they are located. This is a lot like a music tape. You must play the songs in order, or you have to fast forward past songs to get to the one you want.

Random Access Memory (RAM)





  1. Store data and instructions that are used by the CPU to perform some task.
    • These instructions are usually loaded into RAM from a secondary storage device.
    • RAM is also used to store instructions that tell the CPU how to work with its parts. These instructions are usually called drivers.
  2. The instructions in RAM are constantly changing, depending on the needs of the CPU.
  3. The instructions in RAM are volatile.
    • When the computer is turned off the information in RAM disappears.
    • The information in RAM needs to be saved to secondary storage before the computer is turned off.
  4. Access to information is random access.

Thursday, July 15, 2010

Structure

Structure

Group # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Period
1 1
H

2
He
2 3
Li
4
Be

5
B
6
C
7
N
8
O
9
F
10
Ne
3 11
Na
12
Mg

13
Al
14
Si
15
P
16
S
17
Cl
18
Ar
4 19
K
20
Ca
21
Sc
22
Ti
23
V
24
Cr
25
Mn
26
Fe
27
Co
28
Ni
29
Cu
30
Zn
31
Ga
32
Ge
33
As
34
Se
35
Br
36
Kr
5 37
Rb
38
Sr
39
Y
40
Zr
41
Nb
42
Mo
43
Tc
44
Ru
45
Rh
46
Pd
47
Ag
48
Cd
49
In
50
Sn
51
Sb
52
Te
53
I
54
Xe
6 55
Cs
56
Ba
*
72
Hf
73
Ta
74
W
75
Re
76
Os
77
Ir
78
Pt
79
Au
80
Hg
81
Tl
82
Pb
83
Bi
84
Po
85
At
86
Rn
7 87
Fr
88
Ra
**
104
Rf
105
Db
106
Sg
107
Bh
108
Hs
109
Mt
110
Ds
111
Rg
112
Cn
113
Uut
114
Uuq
115
Uup
116
Uuh
117
Uus
118
Uuo

* Lanthanoids 57
La
58
Ce
59
Pr
60
Nd
61
Pm
62
Sm
63
Eu
64
Gd
65
Tb
66
Dy
67
Ho
68
Er
69
Tm
70
Yb
71
Lu
** Actinoids 89
Ac
90
Th
91
Pa
92
U
93
Np
94
Pu
95
Am
96
Cm
97
Bk
98
Cf
99
Es
100
Fm
101
Md
102
No
103
Lr

This common arrangement of the periodic table separates the lanthanoids and actinoids from other elements. The wide periodic table incorporates the f-block. The extended periodic table adds the 8th and 9th periods, incorporating the f-block and adding the theoretical g-block.

Atomic number colors show state at standard temperature and pressure (0 °C and 1 atm)
Solids Liquids Gases Unknown
Borders show natural occurrence
Primordial From decay Synthetic (Undiscovered)