انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية الهندسة
القسم الهندسة الكهربائية
المرحلة 1
أستاذ المادة مراد عبيد حلو العجيلي
4/13/2011 8:37:10 AM
Frequently there is a need for a decimal output even though digital machines operate in pure binary. As a result at the interface between a digital device and the outside world facilities must be provided to convert pure binary to a decimal representation. In practice, for example, calculators have been designed to work entirely in a decimal mode. In such cases decimal digits are represented by a string of binary digits referred to as a code. Four bits are required to represent the ten decimal digits, and since there are 24 combinations of four binary digits, six combinations are not used and the code is said to contain redundancy. The four binary digits can be allocated to ten decimal digits in a purely arbitrary manner and it is possible to generate 2.9 • 101~ four-bit codes, only a few of which have any practical application. The most common group of codes for representing decimal numbers are weighted and there are 17 of these codes. For this group of codes the sum of the weights must be > 9 < 15 and examples of four of them are given in the tabulation shown in Figure 1.10. Of this group the most commonly used weighted code is naturally binary coded decimal (NBCD) which uses the first ten combinations of the 4-bit binary count from 0000 to 1001 inclusive. The code weighting for NBCD is 8, 4, 2, 1 and this can be used to find the corresponding decimal value of a given code. For example" 1001 = 8 x 1 + 4 x 0 + 2 x 0 + 1 x 1 = (9)10 Weighted codes having some negative weights are also available. Such a code is the 8, 4, -2,-1 which, like the 2, 4, 2, 1 code, has the useful property of self-complementation. By complementing each of the bits of a given codeword, a new codeword is formed which represents the 9 s complement of the decimal digit represented by the original codeword. For example, in the 8, 4, -2, -1 code 01 l0 represents (2)10 and, after self-complementation, 1001 represents (7)10 which is the 9 s complement of (7)~0. Another example of a self-complementing code is the XS3 code. This is not a weighted code but contains combinations of natural binary in the range (3)10 to (12)10. The decimal value allocated to each binary code is defined to be 3 less than its actual value. For example, (1)10 is represented by 0100. Decimal digit 0 1 2 3 4 5 6 7 8 9 NBCD 8,4,2,1 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 BCD 7,4,2,1 0000 0001 0010 0011 0100 0101 0110 1000 1001 1010 BCD BCD 2,4,2,1 8,4,-2,-1 0000 0001 0010 0011 0100 1011 1100 1101 1110 1111 0000 0111 0110 0101 0100 1011 1010 1001 1000 1111 Figure 1.10 Binary codes for the decimal digits Excess 3 XS3 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم
|