1 / 28

طراحی مدارهای منطقی

طراحی مدارهای منطقی. دانشگاه آزاد اسلامی واحد پرند. نیمسال دوم 92-93. طراحی مدارهای منطقی. دانشگاه آزاد اسلامی واحد پرند. سیستم اعداد. Why Binary Numbers?. The switching devices used in digital systems are generally two-state devices:

rudolf
Download Presentation

طراحی مدارهای منطقی

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. طراحی مدارهای منطقی دانشگاه آزاد اسلامی واحد پرند نیمسال دوم 92-93

  2. طراحی مدارهای منطقی دانشگاه آزاد اسلامی واحد پرند سیستم اعداد

  3. Why Binary Numbers? • The switching devices used in digital systems are generally two-state devices: • The output can assume only two different discrete values • Transistors, Diodes … • Because the outputs of most switching devices assume only two different values, it is natural to use binary numbers internally in digital systems • For this reason: • Binary numbers and number systems

  4. Number Systems • Base (مبنا) • مبناي r: ارقام محدود به [0, r-1] • دسيمال:(379)10 • باينري:(01011101)2 • اکتال:(372)8 • هگزادسيمال:(23D9F)16

  5. Number Systems • General N = (an-1…a2a1a0.a-1a-2…a-m)r = an-1 r n-1 + an-2r n-2 +… + a1r +a0 + a-1 r -1 + a-2r -2 +… + a-m r -m

  6. Number Systems • General N = (an-1…a2a1a0.a-1a-2…a-m)r = an-1 r n-1 + an-2r n-2 +… + a1r +a0 + a-1 r -1 + a-2r -2 +… + a-m r -m

  7. Number Systems • Binary Numbers • Computers: Strings of bits 0,1 • (101101.10)2 =125 + 024 + 123 + 122 + 021 + 120 + 12-1 + 02-2 32 16 8 4 2 1 .5 .25 .125 .0625 ( 1 1 0 1 0 1 . 1 0 1 1 ) = ( 53.6785 ) B D

  8. 2’s Powers

  9. Number Systems • Conversions • دسيمال  هر مبناي r • هر مبنای rدسيمال • دسيمال  باينري • اکتال  باينري و برعکس • هگزادسيمال  باينري و برعکس

  10. Number Systems • Conversions  هر مبنا به دسیمال

  11. Number Systems • Conversions  دسیمال به هر مبنا • تقسیمات متوالی  در بخش صحیح • خواندن باقیمانده ها از آخر به اول : معادل عدد از چپ به راست • ضرب متوالی  در بخش اعشاری • خواندن بخش صحیح از اول به آخر : معادل اعداد بعد از ممیز از چپ به راست

  12. Number Systems • Conversions  دسیمال به هر مبنا

  13. Number Systems • Conversions  دسیمال به باینری (روش متفاوت) • ورودی: عدد دسیمال N • بزرگترين توان 2 در N را پیدا کن (حفظ جدول توان 2 اینجا کاربرد دارد!) • عدد توان 2 را از N کم کن • يک عدد 1 در بیت معادل رقم توان قرار بده • مرحلة 1 را با عدد به دست آمده از مرحله 2 تکرار کن • توقف الگوریم: صفر شدن اختلاف

  14. Number Systems • Conversions  دسیمال به باینری (روش متفاوت) N = (717)10 717 – 512 = 205 = N1 512 = 29 205 –128 = 77 = N2 128 = 27 77 – 64 = 13 = N3 64 = 26 13 – 8 = 5 = N4 8 = 23 5 – 4 = 1 = N5 4 = 22 1 – 1 = 0 = N6 1 = 20 (717)10 = 29 + 27 + 26 + 23 + 22 + 20 = ( 1 0 1 1 0 0 1 1 0 1)2

  15. Number Systems • Conversions  اکتال به باینری و برعکس هر سه بیت باینری یک بیت اکتال (11010101000.1111010111)2 (011 010 101 000 . 111 101 011 100)2 ( 3 2 5 0 . 7 5 3 4 )8

  16. Number Systems • Conversions  هگزادسیمال به باینری و برعکس هر 4 بیت باینری یک بیت هگزادسیمال (110 1010 1000 . 1111 0101 11 )2 ( 0110 1010 1000 . 1111 0101 1100 )2 ( 6 A 8 . F 5 C )16

  17. Decimal, Binary, Octal, Hexadecimal

  18. Binary Arithmetic • Arithmetic operations in digital systems are usually done in binary: • Design of logic circuits is simpler in binary • Addition table for binary

  19. Binary Arithmetic • Arithmetic operations in digital systems are usually done in binary: • Design of logic circuits is simpler in binary • Subtraction table for binary

  20. Binary Arithmetic • Arithmetic operations in digital systems are usually done in binary: • Design of logic circuits is simpler in binary • Multiplication table for binary

  21. Representation of Negative Numbers • Sign and magnitude • First bit from left is sign bit • 2n-1 -1 : 2n-1 -1 • One’s Complement of N • 2n-1 -1 : 2n-1 -1 • Two’s Complement of N • 2n-1 : 2n-1 -1 3  0011 -3  1011 3  0011 -3  1100 3  0011 -3  1101

  22. Signed Binary numbers n=4

  23. مفهوم Overflow • When the word length is n bits: • We say that an overflow has occurred if the correct representation of the sum (including sign) requires more than n bits Overflow when  sign(A) = sign(B) ≠ sign (result)

  24. Addition of 2’s complement numbers

  25. Addition of 2’s complement numbers

  26. Binary Codes • Large computers work • Internally: binary numbers • The input output equipment: decimal numbers • Because most logic circuits only accept two-valued signals, the decimal numbers must be coded in terms of binary signals • Simplest Binary Coding  BCD (Binary Coded Decimal)

  27. Possible Binary Codes for Decimal Digits

  28. Another Useful Coding • ASCII  American Standard Code for Information Interchange • 7-bit code • Possible 27 = 128 characters can be coded

More Related