0 likes | 9 Views
The computer number system is a way computers represent and process data using different numeral systems. The Binary Number System (Base-2), consisting of only 0s and 1s, is the fundamental system used by computers to store and process information. The Decimal Number System (Base-10), which we use in daily life, consists of digits from 0 to 9. The Octal Number System (Base-8) uses digits from 0 to 7 and is sometimes used in computing for memory addressing. The Hexadecimal Number System (Base-16), which includes digits 0-9 and letters A-F, is commonly used in programming and computer memory
E N D
Number Systems in Computer Dr Anita Choudhary Assistant Professor Department of Computer Science anitach312@gmail.com
Number Systems A number system defines how a number can be represented using distinct symbols. A number can be represented differently in different systems. For example, the two numbers (2A)16 and (52)8 both refer to the same quantity, (42)10, but their representations are different. Several number systems have been used in the past and can be categorized into two groups: positional and non-positional systems.
Positional (or Weighted) Number System: • A positional number system is also known as weighted number system. • As the name implies there will be a weight associated with each digit. • According to its position of occurrence in the number, each digit is weighted. Towards the left the weights increases by a constant factor equivalent to the base or radix. • Largest value of digit position is always 1 less than the base value. The value of a number is weighted sum of its digits. 1358 = 1 x 10^3 + 3 x 10^2 + 5 x 10^1 + 8 x 10^0 13.58 = 1 x 10^1 + 3 x 10^0 + 5 x 10^(−1) + 8 x 10^(−2)
Non-Positional (or Non-weighted) Number System • Non-positional number system is also known as non-weighted number system. • Digit value is independent of its position. • Non-positional number system is used for shift position encodes and error detecting purpose. • Few examples of non-weighted number system are gray code, roman code, excess-3 code, etc.
Types of Number System • There are four common types of number systems based on the radix or base of the number : • Decimal number system or Base10 number system • Binary number system or Base2 number system • Octal number system or Base8 number system • Hexadecimal number system or Base16 number system
Divide by 8 Conversion among Bases Decimal Octal Multiply each bit by 8n 3-bit equivalent binary representation Divide by 16 • Group bits in threes, starting on right Multiply each bit by 16n 3-bit equivalent binary representation 4-bit equivalent binary representation • Multiply each bit by 2n Divide by 2 Binary Hexadecimal • Group bits in four, starting on right 4-bit equivalent binary representation • Note: n is the “weight” of the bit • The weight is the position of the bit, starting from 0 on the right
Quick Example 2510 = 110012 = 318 = 1916 Base