1 / 55

Logic and Computer Design Fundamental

Logic and Computer Design Fundamental. Chapter 1 Digital and Computer Information M. Mano & Charles R. Kime 2008, Pearson Education, Inc. Overview. Sistem Komputer dan Sistem Digital Representasi Informasi Sistem Bilangan [biner, oktal dan heksadesimal] Operasi Aritmatik

wiley
Download Presentation

Logic and Computer Design Fundamental

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. Logic and Computer Design Fundamental Chapter 1 Digital and Computer Information M. Mano & Charles R. Kime 2008, Pearson Education, Inc

  2. Overview • Sistem Komputer dan Sistem Digital • Representasi Informasi • Sistem Bilangan [biner, oktal dan heksadesimal] • Operasi Aritmatik • Dasar Konversi • Kode Desimal [BCD (binary coded decimal), parity] • Kode Gray • Kode Alphanumeric

  3. Discrete Discrete Information Inputs Discrete Processing System Outputs System State Sistem Digital • Mengambil satu set informasi diskrit inputs dan informasi diskrit internal (system state) dan menghasilkan satu set informasi diskrit outputs.

  4. Tipe2 dari sistem digital • Tanpa kondisi (No state present) • Sistem Logika kombinasi • Output = Fungsi (Input) • Dengan kondisi(State present) • Kondisi di-updated pada waktu diskrit => Sistem Urutan Synchronous • Kondisi di-updated setiap waktu => Sistem Urutan Asynchronous • Kondisi/keadaan = Function (Keadaan, Input) • Output = Fungsi (Keadaan) atau Fungsi Keadaan (Keadaan, Input)

  5. Contoh Sistem Digital: Penghitung Digital (Digital Counter (e. g., odometer): Count Up 0 0 1 3 5 6 4 Reset Inputs: Count Up, Reset Outputs: Visual Display "Value" of stored digits State: Synchronous or Asynchronous?

  6. Memory • Control • Datapath • CPU • unit • Input/Output Contoh Komputer Digital Inputs: Keyboard, mouse, modem, microphone Outputs: CRT, LCD, modem, speakers Synchronous or Asynchronous?

  7. Sinyal • Suatu variabel informasi yang dinyatakan dengan besaran fisik. • Untuk Sistem digital, variabel diambil pada nilai diskrit. • Dua level, atau nilai biner yang umum dipakai sebagai nilai pada sistem digital. • Nilai Biner dinyatakan dengan : • digits 0 and 1 • words (symbols) False (F) and True (T) • words (symbols) Low (L) and High (H) • and words On and Off. • Nilai biner dapat juga dinyatakan dalam nilai atau range dari kwantitas fisik.

  8. Nilai Biner: Kwantitas fisik yang lain • Sebutkan physical quantities yang lain yang menyatakan 0 and 1? • CPU Voltage • Disk • CD • Dynamic RAM Magnetic Field Direction Surface Pits/Light Electrical Charge

  9. Kedepan….Sistem Embedded • Komputer sebagai bagian integral dari produk yang lain. • Contoh dari komputer embedded • Microcomputers • Microcontrollers • Digital signal processors

  10. Sistem Embedded • Contoh dari Aplikasi Sistem Embedded • Cell phones • Automobiles • Video games • Copiers • Dishwashers • Flat Panel TVs • Global Positioning Systems

  11. Embedded systems overview • Sistem komputasi ada di-mana-mana. • Umumnya orang hanya berpikir tentang komputer “desktop” • PC’s • Laptops • Mainframes • Servers • Tetapi ternyata ada sistem yang lain dari tipe komputasi • Sejauh ini yang lebih dikenal….....

  12. Sistem Komputasi Embedded • Computing systems embedded within electronic devices • Hard to define. Nearly any computing system other than a desktop computer • Billions of units produced yearly, versus millions of desktop units • Perhaps 50 per household and per automobile Computers are in here... and here... and even here... Lots more of these, though they cost a lot less each.

  13. Sebagian daftar dari Sistem embedded. Modems MPEG decoders Network cards Network switches/routers On-board navigation Pagers Photocopiers Point-of-sale systems Portable video games Printers Satellite phones Scanners Smart ovens/dishwashers Speech recognizers Stereo systems Teleconferencing systems Televisions Temperature controllers Theft tracking systems TV set-top boxes VCR’s, DVD players Video game consoles Video phones Washers and dryers Anti-lock brakes Auto-focus cameras Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders Cell phones Cell-phone base stations Cordless phones Cruise control Curbside check-in systems Digital cameras Disk drives Electronic card readers Electronic instruments Electronic toys/games Factory control Fax machines Fingerprint identifiers Home security systems Life-support systems Medical testing systems Daftar ini akan berlanjut terus…sesuai perkembangan

  14. Tiga kunci teknologi sistem embedded. • Teknologi Suatu penyelesaian tugas/pekerjaan terutama dengan menggunakan technical processes, metode2, atau pengetahuan • Tiga kunci teknologi sistem embedded. • IC technology • Processor technology • Design technology

  15. j = - 1 i = n - 1 å å + i j (Number)r = A r A r i j i = 0 j = - m (Integer Portion) (Fraction Portion) + Representasi Sistem Bilangan • Radix Positif, positional sistem bilangan • Suatu bilangan dengan radixr adalah menyatakan untaian dari digit:An - 1An - 2 … A1A0 .A- 1 A- 2 … A- m +1 A- myang mana 0 £ Ai < r dan . Adalah titik radix • Untaian digit menyatakan urutan pangkat. ( ) ( )

  16. Contoh – Sistem Bilangan

  17. Pangkat Spesial dari 2 • 210 (1024) is Kilo, denoted "K" • 220 (1,048,576) is Mega, denoted "M" • 230 (1,073, 741,824)is Giga, denoted "G"

  18. Pangkat Positif dari 2 • Berguna sebagai dasar konversi. Exponent Value Exponent Value 0 1 11 2,048 1 2 12 4,096 2 4 13 8,192 3 8 14 16,384 4 16 15 32,768 5 32 16 65,536 6 64 17 131,072 7 128 18 262,144 8 256 19 524,288 9 512 20 1,048,576 10 1024 21 2,097,152

  19. Angka dengan dasar/basis yang berbeda • Bagus…sebagai bahan pengingat. Decimal Binary Octal Hexa decimal (Base 10) (Base 2) (Base 8) (Base 16) 00 00000 00 00 01 00001 01 01 02 00010 02 02 03 00011 03 03 04 00100 04 04 05 00101 05 05 06 00110 06 06 07 00111 07 07 08 01000 10 08 09 01001 11 09 10 01010 12 0A 11 0101 1 13 0B 12 01100 14 0C 13 01101 15 0D 14 01110 16 0E 15 01111 17 0F 16 10000 20 10

  20. Hubungan pada Sistem Bilangan Sifat-sifat Sistem Desimal : • Terdiri dari 10 bilangan pokok • Pangkat terkecil (0), makin kekiri bertambah dengan 1 • Koefisien : 0,1,….10 • Jika dalam satu kolom koefisien melebihi bil dasarnya pindah kekiri dengan penambahan 1

  21. Hubungan penting yang harus diingat : • Satu bilangan Oktal terdiri dari 3 bil biner • Satu bilangan Heksadesimal terdiri dari 4 bil biner Hubungan dapat digambarkan sbb : 161 160 82 81 80 28 27 26 25 24 23 22 21 20

  22. CARA MENGUBAH DARI MASING-MASING SISTEM BILANGAN : 1. DesimalkeBiner : • Integer : Dibagidengan 2 berturutandanmasing- masingsisanyamerupakanbagianbilbiner tersebut . Contoh : 11/2 5 sisa1 5/2  2 sisa1(1011) 2 2/2 1sisa0 • Pecahan : Dikalikandengan 2 berturutandanbilbulatnyamerupakanbilbiner

  23. Contoh :0,8125 x 2 = 1,6250 10,6250x2 = 1,2500 1 0,2500x 2 = 0,50000 (1101)2 0,5000x2 = 1,0000 1 Jadi : (11,8125 ) 10= ( 1011,1101)2 2. Biner ke Desimal • Integer : Masing-masing bilangan biner dikalikan 2 dengan pangkat paling belakang = 0 sedang makin kekiri bertambah dengan 1 Contoh :(100110) 2 = (-----) 10

  24. (100110)2 = 1x25 + 0x24 +0x23+1x22+1x21+0x20 = 32 + 4 + 2 = 38 • Pecahan : Masing-masing bil biner dikalikan 2, dan pamgkatnya paling depan = 0, makin kekanan berkurang dengan 1 Contoh : (0.1101)2 + (………….) 10 (0.1101) 2 = 0x20+1x2-1+1x2-2+0x2-3+1x2-4 = 0,5 + 0,25 + 0,0625 = 0,8125

  25. 3. Oktal ke Biner: Masing-masing bil diterjemah- kan dalam biner dan tiap bilangan harus terdiri dari 3 bil biner Contoh :(7314) 8 7 3 1 4 (111) (011) (001) (100) (111 011 001 100 )2 4. Desimal ke Oktal : Analog dengan butir 1 dengan bil dasar 8 5. Oktal ke Desimal : Analog dengan butir 2 dengan bil dasar 8

  26. Untuk Heksadesimal ke Biner, Desimal ke Heksadesimal serta Heksadesimal ke Desimal  Analog dengan butir 3,4,5 CARA PERHITUNGAN PADA SISTEM BINER: Penjumlahan : Contoh : 0+1 = 1 1 0 1 1 0  yang ditambah 0+0 = 0 1 0 1 1 1  penambah 1+0 = 1 10 1 1 0 1 Jumlah 1+1 = (1) 0 Pengurangan : analogi dengan penjumlahan hanya ada ‘pinjaman’ bila diperlukan

  27. Contoh : 10 1 1 0 1  Yang dikurang 1 0 0 1 1 1 Pengurang0 0 0 1 1 0  Selisih Perkalian : 1 0 1 1  Yang dikalikan 1 0 1  Pengali 1 0 1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 1 Hasil perkalian

  28. Konversi Biner ke Desimal • Untuk mengkonversi ke desimal, gunakan aritmatika desimal untuk membentuk: S (digit × respective power of 2). • Example:Convert 110102to N10:

  29. Konversi Desimal ke Biner • Metode ke-1 • Subtract the largest power of 2 that gives a positive remainder and record the power. • Repeat, subtracting from the prior remainder and recording the power, until the remainder is zero. • Place 1’s in the positions in the binary result corresponding to the powers recorded; in all other positions place 0’s. • Example: Convert 62510 toN2

  30. Dasar Umum sistem bilangan Nama Radix Digits Biner 2 0,1 Oktal 8 0,1,2,3,4,5,6,7 Desimal 10 0,1,2,3,4,5,6,7,8,9 Heksadesimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F • Enam huruf (penambahan dari angka integer 10) • dalam heksadesimal menyatakan: A – F = 10 - 15

  31. Konversi antar Dasar (basis) • Metode 2 • Untuk mengkonversi dari satu basis ke yang lain. 1) Konversikan bag integer 2) Konversikan bag pecahan 3) Gabung kedua hasil dengan radix point

  32. Konversi secara detail • Mengkonversi bag integer. Berulang bagilah angka dengan radix yang baru dan simpan sisanya.Digit dengan radix baru adalah sisa yang didapat dengan di-urutkan berlawanan. Bila radix yang baru > 10, kemudian konversikan semua sisa > 10 ke digit A, B, … • Mengkonversi bag integer.pecahan Berulang kalikan bag pecahan dengan radix yang baru dan simpan hasil yang integer. Digit untuk radix yang baru adalah digit integer sesuai urutan . Apabila radix yang baru > 10, kemudian konversikan integer> 10 ke digit A, B, …

  33. Contoh: • Konversikan 46.687510 ke basis 2 • Konversikan 46 ke basis 2 • Konversikan 0.6875 ke basis 2 : • Gabungkanlah hasilnya dengan radix point:

  34. Keterangan Tambahan- Bag Pecahan • Catatan bahwa dalam mengkonversi, bag pecahan akan menjadi 0 sebagai hasil dari pengulangan • Umumnya , bisa terjadi tetapi bisa juga tidak terjadi. • Contoh:Konversikan 0.6510 ke N2 • 0.65 = 0.1010011001001 … • Bag pecahan akan berulang setiap 4 step dan mengulang 1001 selamanya! • Penyelesaian: Pastikan jumlah bit yang benar, bulatkan atau hilangkan yang lain.

  35. Mengecek hasil konversi • Untuk mengkonversi balik,jumlahkan perkalian digit dengan pangkat yang sesuai dari r. • Dari konversi yang lalu: 46.687510 1011102 = 1·32 + 0·16 +1·8 +1·4 + 1·2 +0·1 = 32 + 8 + 4 + 2 = 46 0.10112 = 1/2 + 1/8 + 1/16 = 0.5000 + 0.1250 + 0.0625 = 0.6875

  36. Oktal (Heksadesimal) ke Biner dan sebaliknya • Oktal (Heksadesimal) to Biner: • Buatlah setiap Oktal (heksadesimal) menjadi tiga(empat) digit biner mulai dari radix point ke-kedua arah. • Biner ke Oktal (Heksadesimal): • Group-kan digit biner menjadi tiga (empat) bit group mulai dari radix point ke-kedua arah. Tambahkan nol bila dibutuhkan pada bag pecahan. • Konversikan masing2 group dari tiga (empat) ke oktal (heksadesimal) digit.

  37. Oktal to Heksadesimal lewat Biner • Konversikan oktal ke biner. • Gunakan grouping empat bit dan konversikan seperti diatas ke heksadesimal digits. • Contoh: Oktal ke Biner ke Heksadesimal ( 6 3 5 . 1 7 7 ) 8 • Bagaimana konversi ini bisa bekerja?

  38. Catatan Terakhir Konversi • Sebetulnya dapat pula dilakukan aritmatika dalam basis yang lain, tapi harus dsangat hati2. • Contoh: Konversikan 1011102 ke basis 10 menggunakan aritmatika biner : Step 1 101110 / 1010 = 100 r 0110 Step 2 100 / 1010 = 0 r 0100 Converted Digits are 01002 | 01102 or 4 610

  39. Kode Biner untuk digit Desimal Lebih dari 8,000 jalan yang dapat dipilih dari 10 elements ke 16 bilangan biner 4 bits. Yang sering digunakan adalah: Decimal 8,4,2,1 Excess3 8,4, - 2, - 1 Gray 0 0000 0011 0000 0000 1 0001 0100 0111 0100 2 0010 0101 0110 0101 3 0011 0110 0101 0111 4 0100 0111 0100 0110 5 0101 1000 1011 0010 6 0110 1001 1010 0011 7 0111 1010 1001 0001 8 1000 1011 1000 1001 9 1001 1 100 1111 1000

  40. Binary Coded Decimal (BCD) • Kode BCD adalah kode 8,4,2,1 . • This code is the simplest, most intuitive binary code for decimal digits and uses the same powers of 2 as a binary number, but only encodes the first ten values from 0 to 9. • Example: 1001 (9) = 1000 (8) + 0001 (1) • How many “invalid” code words are there? • What are the “invalid” code words?

  41. Kode Excess 3 dan Kode 8, 4, –2, –1

  42. Gray Code Decimal 8,4,2,1 Gray • What special property does the Gray code have in relation to adjacent decimal digits? 0 0000 0000 1 0001 0100 2 0010 0101 3 0011 0111 4 0100 0110 5 0101 0010 6 0110 0011 7 0111 0001 8 1000 1001 9 1001 1000

  43. 111 000 100 000 B 0 B 1 101 001 001 110 B 2 G 2 G 1 G 111 0 010 011 101 100 011 110 010 (b) Gray Code for Positions 0 through 7 (a) Binary Code for Positions 0 through 7 Gray Code (Continued) • Does this special Gray code property have any value? • An Example: Optical Shaft Encoder

  44. Gray Code (Continued) • How does the shaft encoder work? • For the binary code, what codes may be produced if the shaft position lies between codes for 3 and 4 (011 and 100)? • Is this a problem?

  45. Answer 1: The encoder disk contains opaque and clear areas. • Opaque represents a 0 and clear a 1. Light shining through each ring of the encoder corresponding to a bit of the code strikes a sensor to produce a 0 or a 1. • Answer 2: In addition to the correct code, either 011 or 100, the codes 000, 010, 001, 110, 101, or 111 can be produced. • Answer 3: Yes, the shaft position can be completely UNKNOWN!

  46. Gray Code (Continued) • For the Gray code, what codes may be produced if the shaft position lies between codes for 2 and 6 (010 and 110)? • Is this a problem? • Does the Gray code function correctly for these borderline shaft positions for all cases encountered in octal counting?

  47. Answer 1: Only the correct codes, either 010 or 110 • Answer 2: No, the shaft position is known to be either 3 or 4 which is OK since it is halfway in between. • Answer 3: Yes, since an erroneous code cannot arise. This includes between 0 and 7 (000 and 100).

  48. Perhatian: Konversi atau Coding? • Jangan Bingung antara konversi dari bilangan desimal ke biner dengan coding suatu bilangan desimal ke BINARY CODE.  • 1310 = 11012 (Ini adalah konversi)  • 13  0001|0011(Ini adalah coding)

  49. Aritmatika BCD Suatu BCD code, dijumlahkan dengan aritmatika biner: 8 1000 Eight +5 +0101 Plus 5 13 1101 is 13 (> 9) Catatan bahwa hasik adalah > 9, seharusnya dinyatakan dalam 2 digit Untuk mengkoreksi, tambahkan 6 modulo 16. 8 1000 Eight +5 +0101 Plus 5 13 1101 is 13 (> 9) +0110 so add 6 carry = 1 0011 leaving 3 + cy 0001 | 0011 Final answer (two digits) • If the digit sum is > 9, add one to the next significant digit

  50. Contoh penjumlahan BCD • Tambahkan 2905BCD dg1897BCD Tunjukkan simpanan dan koreksi digit. 0 0001 1000 1001 0111 + 0010100100000101

More Related