1 / 20

Organisasi dan Arsitektur Komputer

Computer Arithmetic. Organisasi dan Arsitektur Komputer. ARITHMATIC LOGIC UNIT. 1. FIXED POINT ARITHMATIC YANG MENCAKUP : Adder ( Penambahan ) Subtracter ( Pengurangan ) Multiplication ( Perkalian ) Division ( Pembagian ) 2. FLOATING POINT ARITHMATIC . ALU Inputs and Outputs.

lyle
Download Presentation

Organisasi dan Arsitektur Komputer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Arithmetic Organisasi dan Arsitektur Komputer

  2. ARITHMATIC LOGIC UNIT 1. FIXED POINT ARITHMATIC YANG MENCAKUP : • Adder (Penambahan) • Subtracter(Pengurangan) • Multiplication (Perkalian) • Division (Pembagian) 2. FLOATING POINT ARITHMATIC

  3. ALU Inputs and Outputs

  4. NilaiTanda • Bit paling kiriadalahsebagai bit tanda • 0 berari positive • 1 berarti negative • +18 = 00010010 • -18 = 10010010 • Problems : • memerlukanpertimbangantandamaupuannilaibilanganuntukpenjumlahandanpengurangan • Two representations of zero (+0 and -0)

  5. Komplemen 2 (Two’s Compliment) Merupakanperbaikannilaitanda yang memilikikekuranganpadaoperasipenjumlahan danpengurangansertarepresentasibilangannol • +3 = 00000011 • +2 = 00000010 • +1 = 00000001 • +0 = 00000000 • -1 = 11111111 • -2 = 11111110 • -3 = 11111101

  6. Contoh : + 2110 = 0001 01012 bilangannegatifdibentukdengancara + 2110 = 0001 01012 Dibaliksehinggamenjadi : = 1110 10102 Ditambah LSB 1, menjadi: = 1110 10112 = -2110

  7. Range of Numbers • 8 bit komplemen 2 • +127 = 01111111 = 27 -1 • -128 = 10000000 = -27 • 16 bit komplemen 2 • +32767 = 011111111 11111111 = 215 - 1 • -32768 = 100000000 00000000 = -215

  8. Conversion Between Lengths Nilaipositifdenganmemberikannilai tandanol • +18 = 00010010 • +18 = 00000000 00010010 Nilaipositifdenganmemberikannilai tandasatu • -18 = 10010010 • -18 = 11111111 10010010 • i.e. pack with MSB (sign bit)

  9. Aritmatik Integer Komplemen 2 : • Penjumlahan • Pengurangan • Perkalian • Pembagian

  10. Contoh: (- 6) + (+3) (+2) + (+3) 1010 0010 0011 0011 1101 (-3) 0101 (+5) 6 + 3 7 + (-7) 0110 0111 0011 1001 1001 overflow 10000 (0) (-1) + (-5) 1111 1011 1010 (-6)

  11. Multiplication • Complex • Work out partial product for each digit • Take care with place value (column) • Add partial products

  12. Multiplication Example • 1011 Multiplicand (11 dec) • x 1101 Multiplier (13 dec) • 1011 Partial products • 0000 Note: if multiplier bit is 1 copy • 1011 multiplicand (place value) • 1011 otherwise zero • 10001111 Product (143 dec) • Note: need double length result

  13. Unsigned Binary Multiplication

  14. Execution of Example

  15. Flowchart for Unsigned Binary Multiplication

  16. Division • More complex than multiplication • Negative numbers are really bad! • Based on long division

  17. Division of Unsigned Binary Integers Quotient 00001101 Divisor 1011 10010011 Dividend 1011 001110 Partial Remainders 1011 001111 1011 Remainder 100

  18. Flowchart for Unsigned Binary Division

  19. Floating Point ALU untuk floating point dapatdiimplementasikandenganmenggunakanduarangkaianaritmatika fixed point yang terpisahyaitu unit exponent dan mantissa

  20. Contoh Floating Point

More Related