1 / 11

SISTEM BILANGAN & SISTEM KODE

SISTEM BILANGAN & SISTEM KODE. PENGANTAR TEKNOLOGI INFORMASI (A). STMIK JAKARTA STI&K 2012. Sistem Kode. Data yang diproses dalam sistem digital umumnya direpresentasikan dengan kode tertentu Terdapat beberapa sistem kode : Kode BCD Kode Excess-3 (XS-3) Kode Gray Kode 7 Segment

shea
Télécharger la présentation

SISTEM BILANGAN & SISTEM KODE

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. SISTEM BILANGAN& SISTEM KODE PENGANTAR TEKNOLOGI INFORMASI (A) STMIK JAKARTA STI&K 2012

  2. Sistem Kode • Data yang diproses dalam sistem digital umumnya direpresentasikan dengan kode tertentu • Terdapat beberapa sistem kode : • Kode BCD • Kode Excess-3 (XS-3) • Kode Gray • Kode 7 Segment • Kode ASCII

  3. Mengapa Sistem Kode ? • Sistem Bilangan hanya dapat menyajikan bilangan positif saja • Sistem Kode dapat menyajikan berbagai macam jenis data seperti bilangan, simbol, maupun huruf • Sistem Kode dapat menyajikan bilangan positif maupun bilangan negatif

  4. Kode BCD (Binary Coded Decimal) • Kode BCD ditulismenggunakankodebiner 4 bit untukmerepresentasikanmasing-masing digit desimaldarisuatubilangan • Contoh : 5 2 9 Desimal 0101 0010 1001 BCD • DalamKode BCD terdapat 6 buahkode yang tidakdapatdigunakan (Invalid Code) yaitu 1010,1011,1100,1101,1110,1111 • Sehinggahanyaada 10 buahkode yang valid,yaitukode-kodeuntukmenyajikanbilangandesimal 0 - 9

  5. Kode Excess-3 (XS-3) • Untuk menyusun kode XS-3 dari suatu bilangan desimal, masing-masing digit dari suatu bilangan desimal ditambah dengan 3, kemudian hasilnya dikonversi seperti BCD • Contoh : • Ubah bilangan desimal 12 ke kode XS-3 1 2 Desimal 3 +3 + 4 5 0100 0101 XS-3

  6. Invalid Code XS-3 • Ada 6 kode XS-3 yang tidak dapat digunakan atau Invalid Code, Yaitu 0000, 0001, 0010, 1101, 1110, dan 1111 • Contoh : • Ubah kode XS-3 0111 0001 1010 ke desimal ! 0111 0001 1010 XS-3 7 1 10 3 -3 - 3 – 4 -2 7 Desimal (invalid)

  7. Kode Gray • Kode Gray biasanyadigunakansebagai data yang menunjukkanposisidarisuatuporosmesin yang berputar • Cara mengubahbilangandesimalkekode Gray: • Contoh : Ubahbilangandesimal 13 kekode Gray ! 13 Desimal + + + abaikanbawaannya 1 1 0 1 1 0 1 1 kode Gray

  8. Kode 7-Segment • Adalahpiranti yang digunakanuntukmenampilkan data dalambentukdesimal • Setiap segment dariperaga 7-segment berupa LED yang susunannyamembentuksuatukonfigurasitertentusepertiangka 8 • Ada 2 jenisperaga 7-segment : • Common Cathode, sinyaltinggi (1)-LED nyala • Common Anodhe, sinyalrendah (0)-LED nyala

  9. Kode ASCII • Singkatan dari American Standard Code for Information Interchange • Adalah kode biner untuk merepresentasikan bilangan, huruf, dan simbol, sehingga biasa disebut juga kode Alfanumerik • Dalam komunikasi data memungkinkan terjadi kesalahan pada bagian-bagian data. Untuk mendeteksi adanya kesalahan-kesalahan tersebut ditambahkan Bit Paritas (Parity Bit) yang ditempatkan sebagai MSB

  10. Bit Paritas • Ada 2 Bit Paritas : • Bit Paritas Genap • Bit Paritas Ganjil • Bit Paritas Genap : Nilai bit paritas dipilih sedemikian rupa sehingga jumlah bit 1 dalam suatu kode ASCII (termasuk bit paritasnya) berjumlah genap • Contoh : Kode ASCII untuk C adalah 1000011 Bit paritas genapnya 11000011 • Bit Paritas Ganjil : Nilai bit paritas dipilih sedemikian rupa sehingga jumlah bit 1 dalam suatu kode ASCII (termasuk bit paritasnya) berjumlah ganjil • Contoh : Kode ASCII untuk C adalah 1000011 Bit paritas ganjilnya 01000011

  11. NilaiHeksadesimalUntukBeberapaKode ASCII 7-bit Simbol ASCII Simbol ASCII Simbol ASCII Simbol ASCII 0 30 F 46 a 61 w 77 1 31 G 47 b 62 x 78 2 32 H 48 c 63 y 79 3 33 I 49 d 64 z 7A 4 34 J 4A e 65 5 35 K 4B f 66 6 36 L 4C g 67 7 37 M 4D h 68 8 38 N 4E i 69 9 39 O 4F j 6A : 3A P 50 k 6B ; 3B Q 51 l 6C < 3C R 52 m 6D = 3D S 53 n 6E > 3E T 54 o 6F ? 3F U 55 p 70 @ 40 V 56 q 71 A 41 W 57 r 72 B 42 X 58 s 73 C 43 Y 59 t 74 D 44 Z 5A u 75 E 45 v 76

More Related