vinothinisureshbabu
289 views
25 slides
Nov 02, 2019
Slide 1 of 25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
About This Presentation
number system and codes
Size: 385.97 KB
Language: en
Added: Nov 02, 2019
Slides: 25 pages
Slide Content
G.Vinothini M.sc.,M.phil., Department of Information Techonology, Bon Secours College for Women, Thanjavur. DIGITAL COMPUTER FUNDAMENTAL
NUMBER SYSTEM AND CODES M.A.ASMIRA II - IT
The binary number system is a numbering system that represents numeric values using two unique digits (0 and 1 ). The binary number system is also called base-2 number system. Ex: (1011001) 2 Binary Numbers
The decimal or “denary” counting system uses the Base-of-10 numbering system where each digit in a number takes on one of ten possible values, called “digits”, from 0 to 9 Ex: 213 10 DECIMAL NUMBER
Binary to Decimal Conversion of numbers uses weighted columns to identify the order of the digits to determine the final value of the number Binary to Decimal Conversion Conversion of binary to decimal (base-2 to base-10) numbers
binary number: 1 1 1 1 power of 2: 2 5 2 4 2 3 2 2 2 1 2 Example : Find the decimal value of 111001 2 : 111001 2 = 1(2) 5 +1(2) 4 +1 ( 2) 3 +0 ( 2) 2 +0 ( 2) 1 +1 ( 2) = 57 10
Conversion steps: Divide the number by 2. Get the integer quotient for the next iteration. Get the remainder for the binary digit. Repeat the steps until the quotient is equal to 0. DECIMAL TO BINARY CONVERSION
Binary addition is much like your normal everyday addition (decimal addition), except that it carries on a value of 2 instead of a value of 10 . BINARY ADDITION Therefore in binary: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10 (which is 0 carry 1)
Binary subtraction is also similar to that of decimal subtraction with the difference that when 1 is subtracted from 0, it is necessary to borrow 1 from the next higher order bit and that bit is reduced by 1 (or 1 is added to the next bit of subtrahend) and the remainder is 1. BINARY SUBTRACTION Rules: 0 - 0 = 0 1 - 0 = 1 1 - 1 = 0 0 - 1 = 1 with a borrow of 1
1 ’s COMPLEMENT The 1’s complement of a binary number is the number that results when we change each 0 to 1 and each 1 to o in other words 1’s complement of 100 is 011 . Ex: The 1’s complement of 1001 is 0110 The 1’s complement of 1010 is 0101
1’s complement subtraction: The 1’s complement of the subtrahend is added the minuend .The last carry (called the end around carry) if any , is then added to the partial result to get the final answer. 1.Sub 1101 from 1010 1010 0010 + -------- 1100 Ans : -0011 2. Sub 0110 from 1001 1001 1001 + -------- 10010 1 + --------- Ans : 0011
2’s complement The 2’s complement of a binary number is obtained by adding 1 to its 1’s complement . i.e., 2’s complement = 1’s complement + 1 Ex: Number 2’s complement 1110 0001+1 =0010 0001 1110+1 = 1111 10110 01001+1 =01010
2’s complement subtraction The 2’s complement of the subtrahend is added to the minuend , but the end around carry , if generated is disregarded. 1.Sub 101 from 111 111 010 + -------- 1010 Ans : 010 2.Sub 0111 from 0110 0110 1001 + -------- 1111 -------- 0000 1 + -------- Ans : -0001
The octal numeral system , or oct for short, is the base -8 number system, and uses the digits 0 to 7. OCTAL NUMBER Example: 5017 in Octal is equivalent to 101 000 001 111 in binary. 24.3 in Octal is 010 100. 011 in binary.
The hexadecimal numeral system , often shortened to "hex" , is a numeral system made up of 16 symbols ( base 16). The standard numeral system is called decimal (base 10) and uses ten symbols: 0,1,2,3,4,5,6,7,8,9. The English alphabet are used, specifically A, B, C, D, E and F. Hexadecimal A = decimal 10, and hexadecimal F = decimal 15. HEXADECIMAL NUMBERS Ex: Convert (0111 1101) 2 to hexadecimal 0111 1101 = (7D) 16 7 D
BINARY CODES They are several methods that are used to express both numbers & letters as binary codes. It can be classified into following categories: 8421 code BCD code Express – 3
GRAY CODE It is the non-weighted code and it is not arithmetic codes. That means there are no specific weights assigned to the bit position. Gray code cannot be used for arithmetic operation. 0+0=0 1+0=1 0+1=1 1+1=0
BIQUINARY CODE Another weighted code is 5043210. This biquinary code is an example of a 7 bit code with error detection properties. Each biquinary code consists of 5 zeros and 2 ones placed in the corresponding weighted column . One or more bits may change value.
ERROR DETECTING CODE Error-detecting codes are a sequence of numbers generated by specific procedures for detecting errors in data that has been transmitted over computer networks. When bits are transmitted over the computer network, they are subject to get corrupted due to interference and network problems. The corrupted bits leads to spurious data being received by the receiver and are called errors. Error – detecting codes ensures messages to be encoded before they are sent over noisy channels. The encoding is done in a manner so that the decoder at the receiving end can detect whether there are errors in the incoming signal with high probability of success.
CHECKED SUM It is used to detect to errors within the same word. For example , if 10101010 where transmitted using even parity and a 10011010 where received , it would appear as though no error had occurred. EXAMPLE : Word A 10110111 Word B 00100010 Sum 11011001
ERROR CORRECTING CODE ECC (either "error correction [or correcting] code" or "error checking and correcting") allows data that is being read or transmitted to be checked for errors and, when necessary, corrected on the fly . It differs from parity -checking in that errors are not only detected but also corrected. ECC is increasingly being designed into data storage and transmission hardware as data rates (and therefore error rates) increase.