1 / 29

1. Bilangan P ecahan

1. Bilangan P ecahan. Dengan : (A) r = Bilangan A 1 = Digit ke 1 di belakang koma A 2 = Digit ke 2 di belakang koma A 3 = Digit ke 3 di belakang koma A n = Digit ke n di belakang koma r = radik. Bilangan pecahan Biner. Contoh 1.1 :

meadow
Download Presentation

1. Bilangan P ecahan

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. 1. Bilangan Pecahan

  2. Dengan : (A)r = Bilangan A1 = Digit ke 1 dibelakangkoma A2 = Digit ke 2 dibelakangkoma A3 = Digit ke 3 dibelakangkoma An = Digit ke n dibelakangkoma r = radik

  3. BilanganpecahanBiner Contoh 1.1: (0,10011) 2 = (………)10 Solusi:

  4. Contoh 1.2: (0,59375)10 = (……….)2 Solusi: 0,59375 × 2 = 1,1875 0,1875 × 2 = 0,375 0,375 × 2 = 0,75 0,75 × 2 = 1,5 0,5 × 2 = 1,0 Jadi, (0,5937)10 = (0,10011)2

  5. Contoh 1.3:Konversidaribinerke Octal danke Hexadecimal • 10110001101011, 1111002 = 26153, 748 2 6 1 5 3 7 4 • 10111001101011,111100102 = 2C6B,F216 2 C 6 B F 2

  6. Contoh 1.4:Konversidari Octal dan Hexadecimal kebiner • 673,1248 = 1101110110010101002 6 7 3 1 2 4 • 306,D16 = 00110000011011012 3 0 6 D

  7. 2. COMPLEMENT ARITHMETIC

  8. a. Binary 1’s complement for substraction To take the 1’s complement of binary number, Sweply change each bit. The 1’s complement of 1 is 0 and vice versa. The 1’s complement of 1001010 is 0110101. To substract 1’s complement : 1. Take the 1’s complement of the substrahend ( bottom number ) 2. Add the 1’s complement to the minu end ( top number ) 3. Overflow indicated that the answers is positive. Add the overflow to the least significant bit. This operation is called end – around carry ( EAC ).

  9. Lanjutan … 4.If there is no overflow then the answers is negatif. Take the 1’s complement of the original addition to obtain the true magnitude of the answer.

  10. Contoh. 2.1 • Substract 110012 – 100012 Jawab : 11001 11001 -10001 + 01110 1 00111 00111 + 1 1000 Jawabannya adalah : +1000 • Periksa : 2510 – 1710 = 810 EAC + - + Overflow

  11. Contoh. 2-1( Lanjutan ) 2. Substract 100002 – 111012 Jawab : 10000 10000 11101 00010 10010 - 01101 Jawabannyaadalah : - 1101 • Periksa : 1610– 2910 = -1310 1’s Complement + - No overflow

  12. Binary 2’s complement for subtraction the 2’s complement is 1’s complement and then add 1. The 2’s complement of 10110 is 01001+1= 01010 To subtract using 2’s complement idem 1’s complement Contoh. 1. 10112 – 1002 = Jawab. 1011 1011 - 0100 + 1100 overflow 10111 + 111 Jadi 10112 – 1002 = + 1112

  13. Lanjutan ….. 2. 100102 – 110002 = ……….. 2 Jawab. 10010 10010 - 11000 + 01000 11010 101 + 1 110 Jadi 100102 – 11002 = - 1102 2’s comp No overflow

  14. Ignore overflow Sign + b. Operasi adder/subtracter bilangan signed 2’sc Jawaban adder/subtracter diindikasikan oleh bit sign, jika jawaban positif maka bit lainnya merupakan true magnitude dan jika negatif maka bit lainnya merupakan bentuk 2’sc. Contoh ! 1. add untuk bilangan 8 bit 2’sc 01011001 + 10101101 Jawab. 01011001 (+89) + 10101101 (-83) 1 00000110 (+ 6) Jadi true mag = +6

  15. 2. Add 11011001 + 10101101 Jawab. 1011001 (- 39) + 10101101 (- 83) 1 10000110 (-122) jadi true mag 10000110 1111010(-122) 3. Subtract bilangan 8 bit signed 2’sc 01011011 11100101 (+91) (-27) Ignore overflow Sign - 2’sc

  16. 2’sc 2’sc Sign bit + No overflow Sign bit - No overflow 2’sc Jawab. 01011011 01011011 - 11100101 + 00011011 01110110 jadi true mag 01110110 (+118) 4. Subtract 10001010 11111100 Jawab. 10001010 10001010 - 11111100 + 00000100 10001110 jadi true mag 10001110 01110010(-114)

  17. 2. Rubah 10010011 kedalam bilangan decimal menggunakan sistem signed 2’sc. Jawab. 1 0010011 Sign bit 64 32 16 8 4 2 1 = 64+32+8+4+1 1 1 0 1 1 0 1 = 99 true magnitude Jadi true magnitude = -99

  18. 3. Tunjukkan -7810 sebagai bilangan 8 bit signed 2’sc. Jawab. 7810 = 0 1 0 0 1 1 1 0 128 64 32 16 8 4 2 1 true magnitude 01001110 2’sc 10110010 jadi -7810 = 10110010 (signed 2’sc).

  19. 3. BINARY CODE

  20. Pada Binary Code Decimal ( BCD ) setiap digit decimal direpresentasikandenganempat bit biner. Contoh 2-2 Konversibilangan decimal ke BCD • 390610 = ….. BCD Jawab : 3 9 0 6 0011 1001 0000 0110 396010 = 0011100100000110 BCD

  21. Lanjutan ….. 2. 543710 = ….. BCD Jawab : 5 4 3 7 0101 0100 0011 0111 543710 = 0101010000110111 BCD

  22. BCD (Binary Code to Desimal)

  23. odd parity Even parity 4. OTHER DECIMAL CODES 1. BCD, 2421, EXCESS–3(XS-3), 84-2-1 2. Gray Codes 3. ASCII character code 5. ERROR DETECTING CODE Untukmendeteksi error padakomunikasidanprosessing data indikasideteksi error untuksetiapkarakterinformasi / ASCII ditambah 1 bit parity (even, add) Contoh. ASCII A = 1000001 01000001 11000001 T = 1010100 11010100 01010100

  24. Kode Gray

  25. Kode ASCII

  26. Sign bit  6. BINARY STORAGE AND REGISTER Bilangan signed 2’s complement indikasibilangan decimal diletakkanpada Most Significant Bit atau MSB dan bit sisanyasebagai true magnitude. Untuk sign bit 0 true magnitude positif 1 true magnitude negatif Contoh ! 1. Rubah 00101101 kedalambilangan decimal menggunakansistem signed 2’s C. 0 0 1 01101 0432168421 32 + 8 + 4 +1 = 45 Jadi true magnitude adalah +45

  27. Soallatihan ! 1. Tunjukkanbilanganbiner 8 bit signed 2’sc untuk : a. -75 c. -150 b. +47 d. +93 2. Add bilangan 8 bit signed 1’sc dan 2’sc a. 00011110 + 00111001 b. 00110011 + 11001000 3. Subtract bilangan 8 bit signed 1’sc dan 2’sc a. 00111001 – 11001110 b. 10101010 - 10011011

More Related