Page 3 :
orgie a otha ieee reaainlaliaie atin’, , 6. THE BINARY NUMBER SYSTEMS, , A computer interprets information composed of only zeros and ones. Thus, instructions ang ;.,, processed by a computer must be in the form of zeros and ones. In other words, the data are store..., processed as strings of two symbols or two-state devices. A switch, for instance, is a two-state device 5, can be either ON or OFF. Electronic devices such as transistors used in computers function most rejigj,, when operated as switches, i.e., either in a conducting mode or in a non-conducting mode. These ty,, symbols are 0 and 1. These are known as bits, an abbreviation for binary digits. There are four unig:, , combinations of two bits, viz.,, 00 01 10 11, , Likewise, there are 2X22 = 8 unique combinations or strings of 3 bits each, viz.,, , 000 001 010~=— «O11 100 101 110 111, , Each string of bits may be used to represent a code or a symbol.
Page 4 :
, =, , fe jpout 94 characters Which include 26 capital English letters, 26 small English letters, 10, g pete Nut 32 other characters (such as punctuation marks, arithmetic operator symbols, colon,, , , , , , , , , , , , , , , , , ,, at ® vestion mark, =. >, <, etc). All these characters need to be processed by computers., eh cjom Gnd 27 = 128, it is Clear that strings of 6 bits each are insufficient to code 94 characters, pope than 94, However, Strings o, , St 2 jg Tes ing of character’ ne bits each can code these 94 characters because 128 is, S418 "o4, The coding of characters has been standardized to facilitate exchange of recorded data, oe nan 94 ost popular stand, +, sae Spates. The most popular standard is known ag ASCII (American Standard Code for Information, ff eet, , xe ange):, , i ode uses 7 bits to code each character, The g, this, be bs by bs by by by, , significant bits (LSBs) of the code are b; b as 4, a the ASCII code for the English ie 4 as 2 5; bo and the most significant bits (MSBs) are, , even bits are designated as, , by Obj mephy, eh ee OL, , TS can be written down, A String of bits used to represent a, ves called a a ei Coded in ASCII Tequire only 7 bits, Thus, a byte, in this ae ae, on pas 7: a ae Aare a aee (Indian Standard Code for Information Interchange), , : ar ization. it i, pen san sUyte, th this Case, han se nm. Characters coded in ISCII need 8 bits for each, R presentation of Integers, Inthe commonly used decimal system we use ten symbols 0, 1520355451516, 7, 8 and 9 ; its base is, iy A binary system, on the other hand, uses two symbols 0 and 1, as already mentioned. Similarly, a, ppmeal sy ses the 16 symbols 0, 1, 2; 3, 4,5, 6, 7.89, 4, B, C, D, E, F. These three, , viz., the binary System, the decimal System and the hexadecimal System are examples of a, systems system. In a positional system the value of each digit in the given number is determined by, ( the digit itself, , (@ the position of the digit in the number, , Given a decimal integer, we assign its value by first assigning weights to each digit position. Positive, powers of 10 are used as weights to multiply the digits in the number. Thus, the weights are 10° @e.,, uly) for the rightmost digit, 10! (i.e., ten), 10? (i.e., hundred), 103 (i.e. thousand) and so on, for, Secessive digits to its left. The value of the number is obtained by multiplying each digit by its weight, ‘at adding all the products. Thus, the value of the decimal number 6705 is calculated as :, , j 6x10 + 7x1 + 0x10! + 5x10, 600 + 7M + 0 + 5 = 6705, , Fora binary system the base is 2. The two symbols used in this system are the binary digits (bits) 0, re in this system are strings of bits. Consider the binary number : :, , 10100101, f i, MSB LSB, , pun’ ihtmost digit is called the least significant bit (LSB) and ee ee A gited the mest, , i : 5 its in this system are »Wiz,, 2 = 1,2! = 2,, 54 2 MSE), eet pisiened io bite Beis eer ier » 2 ="1048576, i ae ee oe ES = 1024, which is approximately 1000, a kilo. Similarly, M
Page 5 :
‘ ito sent a billion ~ 1024x1094, (Mega) stands for 1024%1024 = 1048576 and G (Giga) is us 24 = I€ 6 and G (Giga) is us, Mega) stands for 1 x 048576 and G (Giga, , i ‘ ‘ ° its bi i, (®) Binary to Decimal Conversion ivalent of a binary number we Saar ean a : il its w,, : : oak . ae Tons ie rightmost digit which has least sig) Cal, , and then add al the p =, , Sigh, ight in the binary system is given in terms of os, , Significant bit (L.S.B.) has least weight. The weight in the, , Ss ic. D1 s . S =, , the base 2, , , , , , , , , , , , , a), it has weight of 2! and so on. Weights of various p42., (in eounae Snir. oro eutne San ae tection on the left from the decimal are Sumner, Table 1, TABLE 1, Positional values of 2, in binary system, Position from decimal Weight (in ae h Power = 2) set, tothe len x) [pe ane Kear Power of2 = Position i“, ; 0 ely ie. P = (v1), 0 1 | Wt, = ap, m 2 24 Power of I position = ting, . : o | " Thus Wt, of I postion = 2» <, = n-l ml I ae, , , , , , , , , , , , Equivalent number in decimal notation is obtained by adding all the Products of the bits by they, Weights., , Number in decimal notation = XB x wt = DB x 2P = YB x 2n-1,, , , , , , , , , , , , , , , , Where, n is the position of the bit. Value of B can be 0 or 1 The Procedure has been expained by, few Sample Problems given here with. :, , ple Problem 1, Convert (1101), into the decimal notation., , Binary number —> Seah T 0 T, Position ofthe digit to the left from the start (n) 4 3 2 1, Powerp =n-1 * 3 2 1 0, WL. of the bit = 2? = 201 2 : 2 2 =, Value at each position = B x we. 1xBag x2aq Ox2=0 |ix2=t, Decimal number =8 +4404 1513, , , , , , , , , , Hence,|(1101)) = (13),, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Sample Problem 2. Convert from binary to decimal notation the number (10010101),, Binary number >] 1 0 0 1 0 1 0 4, 1, Position of the bit 7 6 5 4 2 j, Power p = n 7 6 5 4 3 2 : ;, 2, , Weight = 2° 7 6 2 x < pet, , 1x27 0x26 0x25 1x24 0x23 1x2 a, Value | LB 0 0 6 Ay ‘ 0 |, , Hence, (10010101); = 128 + 16+441 =, , , , (149) jo)