| Mantık Bilginin yapısını inceleyen, doğru ile yanlış akıl yürütmenin ayrımını yapan disiplin. Doğru düşüncenin aletidir. Önceleri bir felsefe dalıyken daha sonra Matematik ve Bilgisayar Biliminin de parçası haline gelmiştir. Mantığa en büyük katkıları Aristoteles ve Gottlob Frege yapmıştır. |
![]() |
| | LinkBack | Seçenekler | Stil |
|
#1
|
|
14.05.08, 02:08
Aritmetik Mantık Birimi | Mikro İşlemci ( CPU-Central Processing Unit-Merkezi işlem Birimi) | Steradyan-Uzay açı birimi | Isı,enerji birimi,Yükselme azalma | Bir Düşünce ve Mantık Problemi Olarak Paradoks-Paradox as a Problem of Logic, Thought | Aritmetik Mantık Birimi (AMB) aritmetik ve mantık işlemlerini gerçekleştiren bir dijital devredir. AMB en basit işlemi gerçekleştiren mikro denetleyiciden, en karmaşık mikroişlemciye sahip bir bilgisayara kadar tüm işlemcilerin yapıtaşıdır. Modern bilgisayarların içinde bulunan mikroişlemcilerin ve ekran kartlarının içinde çok karışık ve güçlü AMB’ler bulunmaktadır. AMB kavramına ilk olarak 1945 yılında matematikçi John von Neumann EDVAC adlı yeni bir bilgisayar üzerine bulgularını anlatan raporunda değinmiştir. ------------------------- 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 GPUs have inside them 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. -------------------------------- 1946 yılında, Von Neumann ve meslektaşları Princeton Institute of Advanced Studies (IAS) için bir bilgisayar tasarlamaktaydı.İlerleyen yıllarda bir çok bilgisayar tasarımı için prototip haline gelmiş olan bu bilgisayarda temel matematiksel işlemleri ( toplama, çıkarma, çarpma ve bölme) gerçekleştirme gerekliliğinden dolayı , Von Neumann işe yarar bir bilgisayarın bahsedilen işlemler için özelleşmiş bir yapıya ihtiyaç olduğuna inanıyordu ve buna bağlı olarak AMB’nin bir zorunluluk olduğunu belirtmiştir. Bir AMB, işlemlerini diğer dijital devrelerin kullandığı sayı biçimiyle aynı şekilde ifade etmelidir. Modern işlemcilerin tamamına yakını İkiye Tümleyen gösterimini kullanmaktadır. İkiye tümleyen gösterimi işaretli ve işaretsiz sayıları kolay ve verimli bir şekilde gösterebildiğinden AMB’ler için işlem kolaylığı sağlamaktadır. Eski bilgisayar ise birçok çeşitli sayı gösterim biçimi kullanmaktaydı. İşlemciler birçok işlemi bir veya daha çok AMB ile gerçekleştirilir. AMB veriyi giriş yazmaçlarından alır, işletir ve sonucu bir çıkış yazmacına kaydeder. Kontrol birimi AMB’nin veriye hangi işlemi yapacağını seçer. İşlemcinin diğer mekanizmaları yazmaçlar ve hafıza arasında verileri taşır. [1] Şekilde görülen 2-bit AMB’nin A ve B isminde iki tane girişi bulunmaktadır. A[0] & B[0] en anlamsız biti, A[1] & B[1] en anlamlı biti göstermektedir. A ve B girişleri soldaki 4 tane mantık kapısına (yukarıdan aşağıya) yönlendirilmektedirler: XOR , VE, VEYA ve XOR.Yukarıdaki 3 mantık kapısı XOR, VE ve VEYA işlemini gerçekleştirirken en son XOR kapısı tam toplayıcının (full adder) giriş kapısıdır. Son adımda ise istenilen sonuç çoklayıcı yardımıyla seçilir. Denetim biriminden gelen 3 bitlik işlem kodu (OP) çoklayıcıya hangi girişi seçmesini gerektiğini belirtir. İşlem kodu = 000 → XOR İşlem kodu = 001 → VE İşlem kodu = 010 → VEYA İşlem kodu = 011 → Toplama Çoklayıcının geri kalan 4 çıkışı farklı işlemler (çıkarma,çarpma vs.) için boş durumda beklemektedir.Gelen elde(carry-in) ve çıkan elde (carry-out) bir çeşit durum yazmacına bağlanmıştır. Temel İşlemler AMB’lerin çoğu aşağıdaki işlemleri gerçekleştirebilir. Toplama,çıkarma ve bazı durumlarda çarpma ve bölme işlemleri (çarpma ve bölme AMB’nin bir birimi olacağı gibi AMB’den bağımsız bir birimde olabilir.AMB’de ne kadar çok birim varsa yapısı da o kadar karmaşık olmaktadır.) Mantıksal işlemler: (VE, DEĞİL, VEYA, ÖZELVEYA) Bit kaydırma işlemleri. Bir sayıyı belirtilen bit sayısı kadar sağa veya sola, işaret genişletilerek veya genişletilmeyerek, kaydırmak veya döndürmek.Kaydırmalar sayıyı 2 ile çarpma veya bölme olarak da düşünülebilinir.Çarpma ve bölme işlemlerinde olduğu gibi bu işlemlerde AMB’den bağımsız birim tarafından üstlenilebilir. Karmaşık İşlemler AMB’ler herhangi bir işlemi yürütecek şekilde tasarlanabilir fakat işlem ne kadar karmaşıksa maliyet artar. Bu maliyet işlemcide kullandığı yer, harcadığı enerji vs. olabilir. Bu sebepten dolayı bir AMB tasarlayıcısı, tasarımın işlemi istenen hızda yapmasını temin ederken, bu tasarımın uygulama esnasındaki karmaşıklığı ve sarfiyatı ile ilgili ödünleşimi de yapması gerekir. Örneğin bir sayının karekökünü alacak bir AMB tasarlandığını düşünelim.İlgili mühendisin önünde aşağıdaki seçenekler bulunmaktadır: Çok fazla karmaşık bir devre tasarlayarak, tek basamakta karekökü hesaplayan bir AMB olabilir.Buna “tek vuruşluk hesaplama (calculation in single cycle)” denir. Çok karmaşık bir devre tasarlayarak, karekökü birkaç basamakta hesaplayan bir AMB olabilir.Burada ki fark basamakların arasındaki geçici sonuçlar arka arkaya dizilmiş devrelerden geçerek her basamakta var olan sonuca yeni bir işlem uygulanarak nihai sonuca ulaşılması işlemidir.Bunu bir üretim bandına benzetebiliriz.Bu sayede AMB aynı anda birkaç sayının karekökünü işleme alabilir.AMB’de bulunan basamak sayısı kadar sayı işlenmeye başladıktan sonra her adımda bir sonuç dışarı çıkar ve böylece AMB dolduktan sonra tek vuruşluk işlem yapandan farkı kalmaz.Bu tip işleme “boru hattı ile hesaplama” denmektedir. Karmaşık bir devre tasarlayarak karekök işlemini değişik basamaklarda hesaplayan bir AMB olabilir. Buna “etkileşimli hesaplama” denmektedir ve genelde mikroprogramlama ile yapılmış karmaşık bir denetim birimi ile gerçekleştirilir. İşlemcide basit bir AMB bulundurulur, yukarıdaki seçeneklerden herhangi birini gerçekleştiren yardımcı bir ikinci işlemci, ayrıca ve daha pahalı bir şekilde sisteme eklenebilecek halde satılabilir. Programcılara yardımcı ikinci bir işlemci veya emülatör bulunmadığını söyleyerek, kendi algoritmalarını yazmalarını söylemek.Bu işlem yazılım kütüphanelerinin var olma nedenidir. Yardımcı işlemcinin varlığı taklit edilerek, program her karekök işlemini gerçekleştirmek istediğinde eğer varsa yardımcı işlemciyi kullanması, yoksa bir kesme yaratarak işletim sistemini karekök işlemini herhangi bir yazılımla gerçekleştirmesi yönünde uyarması şeklinde bir çözüm olabilir. Buna yazılım taklidi denir Yukarıdaki seçenekler en hızlı ve pahalıdan en yavaş ve en ucuza doğru gitmektedir.En basit bilgisayar dahi en karmaşık formülü gerçekleştirebilir fakat basit bilgisayarın var olan işlemi yavaş gerçekleştirmesinin nedeni ,yukarıda belirtilen seçeneklerde olduğu gibi, işlenmesi gerek basamak sayısının artmasıdır. Intel Core veya AMD64 gibi güçlü işlemcilerde çok karmaşık AMB’ler bulundurmak mümkün olduğundan; basit işlemler için 1. seçenek, çoğu karmaşık işlemler için 2. seçenek ve aşırı karmaşık işlemler için 3. seçenek kullanmaktadır. AMB’nin girişleri işlenecek veriler ve denetim biriminden gelen hangi işlemin yapılacağını belirten değerlerdir.Çıkışı ise yapılan işlemin sonucudur. Çoğu AMB tasarımında belirli durumlara göre farklı değerler alan bitler bulunmaktadır bunlara bayraklar denir. Bu bayraklar elde ,taşma, sıfıra bölme vs. gibi olabilir ve AMB’ye giriş ya da çıkış olabilir. Kayan nokta birimi de AMB gibi iki değer arasında belirli işlemleri gerçekleştirir fakat üzerinde çalıştığı değerler ikiye tümleyen ,BCD’den daha karmaşık olan kayan nokta gösterimine sahip değerlerdir. Bu işlemleri gerçekleştirmek için kayan nokta biriminin de içinde AMB’ler bulunabilir. Genel olarak mühendisler ikiye tümleyen, BCD gibi formatlara sahip tam sayı ile aritmetik işlemler yapan birimlere AMB ismini vermektedir. Kayan nokta veya karmaşık sayı gibi daha çok bitle gösterilen biçimlerle işlem yapan birimlere daha yaratıcı isimler verilmektedir. kaynak |
| Sponsorlar |
| |
|
#2
| ||||
| ||||
| Early development In 1946, von Neumann worked with his colleagues in designing a computer for the Princeton Institute of Advanced Studies (IAS). 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." An ALU must process numbers using the same format as the rest of the digital circuit. For modern processors, that almost always is 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. Most of a processor's operations are performed by one or more ALUs. An ALU loads data from input registers, executes, and stores the result into an output register. A Control Unit tells the ALU what operation to perform on the data. Other mechanisms move data between these registers and memory. Simple operations 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 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: 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. Design a very complex ALU that calculates the square root of any number in several steps. But--and here's the trick--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. 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. 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. 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. 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. 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. |
| world kullanıcısının bu bilgilendirici iletisine teşekkür eden üye : | ||
fenci67 (17.05.08) | ||
| Sponsorlar |
| |
![]() |
| Tags |
| amd64, bitle gosterilen bicimler, intel core, karmasik sayi |
| Seçenekler | |
| Stil | |
|
|