Unformatted text preview:

ECE 1315, Number System Supplement 11 Number System (Lecture 1 and 2 supplement) By Dr. Taek Kwon Many different number systems perhaps from the prehistoric era have been developed and evolved. Among them, binary number system is one of the simplest and effective number systems, and has been extensively used in digital systems. Studying number systems can help you understand the basic computing processes by digital systems. 1.1 Positional Number Systems A good example of positional number system is the decimal number system in which we use them almost everywhere number is needed. Another example is the binary system that is used as the basic number system for all computers. In positional number systems, a number is represented by a string of digits where the position of each digit is associated with a weight. In general, a positional number is expressed as: d d d d d d dm m n    1 2 1 0 1 2. where dm1 is referred to as the most significant digit (MSD) and dn as the least significant digit (LSD). Each digit position has an associated weight bi where b is called the base or radix. The point in the middle is referred to as a radix point and is used to separate the integer and fractional part of a number. Integer part is in the left side of the radix point; fraction part is in the right side of the radix point. Fraction is a portion of magnitude of a number which is less than unit (e.g. fraction < 1) and thus it is called a fraction. Let D denote the value (or magnitude) of a positional number, then D can be always calculated by: D d biii nm= =1 (1) Example 1.1.1: Find the magnitude of 245.378 D=  +  +  +  + = 2 8 4 8 5 8 3 8 7 81654843752 1 0 1 210.ECE 1315, Number System Supplement 2 A binary (base=2) number system is a special case of the positional number system in which the allowable digits are 0 and 1 that are called “bits”. The leftmost digit of a binary number is called the most significant bit (MSB) and the rightmost is called the least significant bit (LSB). Because the base of binary numbers is two, bit bi is associated with weight 2i. Example 1.1.2: Magnitude of Binary number 11010010 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 227 6 5 4 3 2 1 0=  +  +  +  +  +  +  +  11010011 1 2 1 2 0 2 1 2 0 2 0 2 1 2 1 223 2 1 0 1 2 3 4.=  +  +  +  +  +  +  +     If the base of a number system is larger than ten, the digits exceeding 9 are expressed using alphabet letters as a convention. For example, hexadecimal number system uses 1-9 and A-F; base-32 number system uses 1-9 and A-V. This example is shown in Table 1. One may then wonder how large-base number systems such as a base-64 are expressed. Fortunately, we rarely use such a high-base number system because we find no real advantages of using them in applications. Moreover, we can always convert them from any high-base number system to a lower base number system, which is the subject of the next section. 1.2 Conversion between 2k bases Number systems with 2k bases have an interesting property in that the conversion between them can be achieved without the computation of Eq. (1). Such number systems include binary, octal, hex, and base-32 number systems. Note that since these number systems possess base 2k, all numbers within these systems can be uniquely represented by k binary bits. For example, octal numbers can be represented by three bits; hex numbers can be represented by four bits, etc. This relation allows us to easily convert between them by simply grouping their binary representation with k bits. Two examples are given in Example 1.2.1. Since the binary representation of 2k base numbers can be directly associated by simple grouping of k digits, the conversion from octal to hex or vice versa can be easily achieved through intermediate step of binary conversion. Example 1.2.2 illustrates this conversion step.ECE 1315, Number System Supplement 3 Table 1. Decimal, binary, hexadecimal, and base-32 Number Systems Decimal Binary Octal Hexadecimal Base-32 0 00000 0 0 0 1 00001 1 1 1 2 00010 2 2 2 3 00011 3 3 3 4 00100 4 4 4 5 00101 5 5 5 6 00110 6 6 6 7 00111 7 7 7 8 01000 10 8 8 9 01001 11 9 9 10 01010 12 A A 11 01011 13 B B 12 01100 14 C C 13 01101 15 D D 14 01110 16 E E 15 01111 17 F F 16 10000 20 10 G 17 10001 21 11 H 18 10010 22 12 I 19 10011 23 13 J 20 10100 24 14 K 21 10101 25 15 L 22 10110 26 16 M 23 10111 27 17 N 24 11000 30 18 O 25 11001 31 19 P 26 11010 32 1A Q 27 11011 33 1B R 28 11100 34 1C S 29 11101 35 1D T 30 11110 36 1E U 31 11111 37 1F VECE 1315, Number System Supplement 4 22 821611010010.10110 011010010.101100 322.5411010010.1011 2.D B= == =Example 1.2.1: Binary to hexadecimal or octal conversion 11010110201101011023268110101102616= == =D Example 1.2.2: Octal to hexadecimal or vice versa 2738010111011210111011216===BB  We have seen that the conversion between numbers with power of radix 2 can be readily achieved through binary expression and regrouping of bits. This convenience led to utilization of hexadecimal (or octal) numbers in representing binary numbers for many computer architecture related issues. For example, the instruction LDAA (Load Accumulator A) of 68HC11 is encoded as the binary number 100001102, but for convenience of writing and reading it is usually expressed in hexadecimal 8616, from which we save time and spaces. Very often, hexadecimal, octal, and binary numbers are interchangeably used in the computer architecture or microprocessor related fields.ECE 1315, Number System Supplement 51.3 General Positional Number System Conversion This section discusses conversion of numbers from any base to any other base. Due to our familiarity and representation of decimal, a convenient way of base-conversion is conversion through the use of decimal. That is, for the conversion from base-k to base-p, we first convert a base-k


View Full Document

U of M ECE 1315 - Number System

Documents in this Course
Load more
Download Number System
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Number System and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Number System 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?