Weighted-Position Number System

Weighted-Position Number System in Switching theory and logic design uploaded at Engineering Study material

Weighted-Position Number System in Switching theory and logic design at Engineering Study material uploaded by suryam m in lecturenotes.net

In a weighted-position numbering system using Indian numerals the value associated with a digit is dependent on its position. The value of a number is weighted sum of its digits. Consider the decimal number 2357. It can be expressed as 2357 = 2 x 103 + 3 x 102 + 5 x 101 + 7 x 100 Each weight is a power of 10 corresponding to the digit’s position. A decimal point allows negative as well as positive powers of 10 to be used; 526.47 = 5 x 102 +2 x 101 + 6 x 100 + 4 x 10-1 + 7 x 10-2 Here, 10 is called the base or radix of the number system. In a general positional number system, the radix may be any integer r > 2, and a digit position i has weight ri. The general form of a number in such a system is dp-1 dp-2, .... d1, d0 . d-1d-2 .... d-n where there are p digits to the left of the point (called radix point) and n digits to the right of the point. The value of the number is the sum of each digit multiplied by the corresponding power of the radix. p −1 D = ∑ d i r i i =− n Except for possible leading and trailing zeros, the representation of a number in positional system is unique (00256.230 is the same as 256.23). Obviously the values di’s can take are limited by the radix value. For example a number like (356)5, where the suffix 5 represents the radix will be incorrect, as there can not be a digit like 5 or 6 in a weighted position number system with radix 5. If the radix point is not shown in the number, then it is assumed to be located near the last right digit to its immediate right. The symbol used for the radix point is a point (.). However, a comma is used in some countries. For example 7,6 is used, instead of 7.6, to represent a number having seven as its integer component and six as its fractional. As much of the present day electronic hardware is dependent on devices that work reliably in two well defined states, a numbering system using 2 as its radix has become necessary and popular. With the radix value of 2, the binary number system will have only two numerals, namely 0 and 1. Consider the number (N)2 = (11100110)2. It is an eight digit binary number. The binary digits are also known as bits. Consequently the above number would be referred to as an 8-bit number. Its decimal value is given by (N)2 = 1 x 27 + 1 x 26 + 1 x 25 + 0 x 24 + 0 x 23 + 1 x 22 + 1 x 21 + 0 x 20 = 128 + 64 + 32 + 0 + 0 + 4 + 2 + 0 = (230)10 Consider a binary fractional number (N)2 = 101.101. Its decimal value is given by (N)2 = 1 x 22 + 0 x 21 + 1 x 20 + 1 x 2-1 + 0 x 2-2 + 1 x 2-3 = 4 + 0 + 1 + + 0 + = 5 + 0.5 + 0.125 = (5.625)10 From here on we consider any number without its radix specifically mentioned, as a decimal number. With the radix value of 2, the binary number system requires very long strings of 1s and 0s to represent a given number. Some of the problems associated with handling large strings of binary digits may be eased by grouping them into three digits or four digits. We can use the following groupings. ƒ Octal (radix 8 to group three binary digits) ƒ Hexadecimal (radix 16 to group four binary digits) In the octal number system the digits will have one of the following eight values 0, 1, 2, 3, 4, 5, 6 and 7. In the hexadecimal system we have one of the sixteen values 0 through 15. However, the decimal values from 10 to 15 will be represented by alphabet A (=10), B (=11), C (=12), D (=13), E (=14) and F (=15). Conversion of a binary number to an octal number or a hexadecimal number is very simple, as it requires simple grouping of the binary digits into groups of three or four. Consider the binary number 11011011. It may be converted into octal or hexadecimal numbers as (11011001)2 = (011) (011) (001) = (331)8 = (1101) (1001) = (D9)16 Note that adding a leading zero does not alter the value of the number. Similarly for grouping the digits in the fractional part of a binary number, trailing zeros may be added without changing the value of the number.

Summary / document preview text:

--



Title:

Weighted-Position Number System

Subject:

Switching theory and logic design

Institute:

Engineering Study material