0% found this document useful (0 votes)
12 views

data representation

The document provides an overview of various number systems including binary, decimal, octal, and hexadecimal, along with conversion methods between them. It details the encoding systems such as ASCII and EBCDIC, and explains Binary Coded Decimal (BCD) and Extended Binary Coded Decimal Interchange Code (EBCDIC). Additionally, it includes examples of converting numbers between these systems and their respective representations.

Uploaded by

vishiattitude18
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
12 views

data representation

The document provides an overview of various number systems including binary, decimal, octal, and hexadecimal, along with conversion methods between them. It details the encoding systems such as ASCII and EBCDIC, and explains Binary Coded Decimal (BCD) and Extended Binary Coded Decimal Interchange Code (EBCDIC). Additionally, it includes examples of converting numbers between these systems and their respective representations.

Uploaded by

vishiattitude18
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
DOC as eer SEqET HTS (Computer Codes) erage Herel Ha (Alphabets), Prete fret (Special Characters) 441 341 (Numeric) 7 et (Alphanumeric Data) *&t @tat @1 ster 7 wee amet, fare ar aie wee fay as er ora Pea ware arti atts tf (BCD — Binary Coded Decimal) Fea APT Decimal Number H Binary F TEA ‘Ff TIMI Decimal Number * 9% H¥ FT FTF an até avert qeata(Ratingyt arent 0 a « se 12 8 Ft soA ara 20 3a = B sob se os w or s9e as = § = D moa cm 9 x oF myer se owe mor wet re sat nog woe ob m« mH wah, eo m3 mo. oR & mo ne 4 = OK 2 4, mL aap as 7m ow. mH ee aS = oO ch 2 O o P vod = O wf sm Z me oR wooo 3 ss som 82 4 “7 es 5 sou 2 = 4G eu ro? ou tT ss 8 oo x 1 os 9 = ¥ = oF ™ 2 -_ 8 mE - oe soa a > wt oF ~S (Substituted) fe arat #1 FH 4 Bit BCD Code merican Standard Code for Information Interchange) areit @ini: ASCH) a waiters Rud are FF wate sends eye Foe aa & fort ae Sale FO OF a 21 eS eT gam orafiea 81 sree + ars ai FI eH tS fraifta erat @ famar order eeqer H cae st Fret ae, dare are a, a Sacer aT et arett sa afeat ta dears tae t, area a 256 Ste Bh ARR TEA TE TAO 127 aa &% wafe 128 @ 256 aH Beer orale (Extended) oe fr a aa #1 we 0 A sk we at fo t93 toes woe 1G wt 2 6 w& wa ot Fe wee ee HS 2 ma os A fo G nak we S10 R280 py ws wr e180 Abst ee ee ee 137 oe 2 23 G a anz 24 0 a9 00171 208 235 o aso G72 bod 20 wat 2 4 208 aa ¢ we = Bar 299 + wae oe jj 200 2a - ase 7 i208 a re toto 210 2a2 ware Patt 243% a | 2 2a wa st 28 2a & wo we Aa baa = wi HE - a2 ma OMe . 1a} ws 2 ra ton M20 : wee wr Mate ' a a * wre ws eat = 458% 150 22 . ee DUC er Oe ed afi | EBCD! Code EBCDICT BI aH “enka agri aes wUz FS” AT (extended binary-coded decimal-interch: Bat 2, at searepiice ait ar afeafaferca are fore wm Seger wis era. (Extended Binary Coded Decimal Interch: Code) 15 378-faz character encoding #3 AT ey a orden tater ott addon fade eqez sitter faeces aoa fear ara 21 we ta ard & are ara fare me ais @, sit 1950 % ame & sat sik 1960 & cre & wry F argtes % atretn eet ae SUT arr om ae fatter tt-sréattem cereerst aot arate &, 92 f Fujitsu-Siemens ‘BS2000 / OSD, OS-IV, MSP #1 MSP-EX, SDS fear dis, Unisys VS 9, Burroughs MCP, 340 ICL VMEI Rea H agd SAAN Ta SHAT are TTS SEA F STAM F Public code Et ATRIA BH wea see ages A Ser are Fea ST aa Sa 3 freon ht aren adiars fara ft ait ararait Fo yqaa vet 256 eet an few sett ae & aa Ht 31 eet were Sager 1 32 fae i frei fear oar @ diate dia wer A eae veer a are at 2 i. adie — & (UTF-8-Unicode Transformation Format-8 aiwe-s oie A aa qiats aartt #1 ws, aan ag & Fs Face aT A ii, ete — 16 (UTE-16) a We Hains seer et a aT a rea (1 ee 16 fae) & Ste Face aT FB Het: FA Word Oriented Format red 1 iii, etoH-32 (UTF-32) ‘Fe Sie 8 wae Ment FT A Mest (Words) Wt 32 fae ¥ pfisis 4 acer sate star freee & were (Types of Number System) SIH BA Number System % ait H wait aa tat farn fet wen % et? . Se IT (Conversion) erat 8? art at afera ye ara & Computer We Hea @ ait fink area data at amet @ rata topes a aT ETAT ait aa ar ee Hh re at are @ Fate goer fen 2 St eee gat fea ra | Number system #1 5401 Saa1 i weltia et fore fae ran tsa iter and ataer aS ST Hi ferad 2 ae ot tae aac oan 8 if eT aaa dad ae ae 2) feet eye, wt We ar Ser aa aT ae ae 4 weft ea 3) 3a:. sifset, faisat, aifteaa ae eer ara] DUC er Oe ed Types of Number System + Ocial aoe aan fire ar wae & eee + Decimal + Binary + Hexadecimal Decimal Binary 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 O1ll 8 1000 2 1001 1010 1.Binary Number system (@Tgatt start fereza )- feirea eet art oer Sa area dae FO ‘weftta aed 2, aren fire 4 haar et far 0 aT 1 ‘wart Fea ard 8 safere F441 ATA (base or radix) “on &, witfe gat Sarat at digits Bet 2 | Binary number system 4 3i¢t #1 angait fefae ar faz Fede feat oer fat a ari a ari ain sae Faria AR ( Positional Value) % Tac FreTaT ware Example ~ (1010), DOC as eer System (sitaeet ar fireen)- Octal Number System # 47a 8 35 08 77% war etd @, eafem caer da 8 cere | 48 sie Fraga? (0, 1,2,3,4, 5.6.7) Example - (242), 2,Octal Number 3.Decimal Number System (Seitwet_ 7at ‘fareen)- “Salient oar Fires ae rat eH sri Afere Sita ara 2, fara feet sft deen at saftia art & fare 7, 8, Te 9 oie wen fea Te | ‘$a Number System #7 STAR (base or radix) 10% ae feat tar farce a ar faa at ar aT Wom eat 8 Sater a fees ce see ta eeT are gear ae ot 10 era e 0,1,2,3,4, 5,6, Example - (162),, yystem (eaeTsetret 4.Hexadecimal Number air feee ‘Prarsdiaet sar faery 10 See TET 6 letters vam eta &, ot Prergan @ (0.1.2.3 4, 5, 6, 7, 8.9,A.B.C .D, E, F) trarsdira + fara 10 am, 133 SABA, ABA, 12 D& arn 4 # E # era 1S STF & ee ahah ‘faa ara 2| gu tar fire 8 aT 16, Alphanumeric FL eet & ‘safe saa ae 16 era 2 | Example -(2A),, Pec m Uni eat ios PE Binary to Decimal- Binary 344 #1 Decimal 4 aaera fare waa eet ment sat at aa & ant fran ara 2 sae aa ee oat ae a cara an a ae Se ‘ig fear are @ Example :- 10101,,, %1 Decimal 74221 FeT-10101 TOLOL. = (12°) + (Ox2") + (1x2) + 0x2") 4 (1x2) (116) + (Ox8) + (124) + (Ox2)-+ (1) =16+0+440+1 =21 2. Binary to Octal Binary Number system #1 Octal number system Hacer & fee aot area deen a1 art i a dm — dine tei 4 ate fen star 2 th ale arf 2g i de a a oat a a0 ar stg ET aE 3. Conversion Binary to Octal Oh O10= 0°2"+1°2' +0 OOO Sa me 04240 100=0*2"+0°2'+ 1° O+0+4 4 010=0*2"+1#2'+0° 04240 242 (242), 4. Binary to Hexadecimal Binary number system 4 Hexadecimal number system Fazer fer fam me argatt far St aret an dan — an & SS Faiz 2 | Conversion Binary to Hexadecimal (210 0010), = Qe J J 10 2 O01 182 40+ OH?” O+2+0+0 2 1+2'40eF"# 142? (A2)¢ (A= 10} 5, Decimal to Binary Conversion steps: 1. Divide the number by 2 2. Get the integer quotient for the next iteration 3. Get the remainder for the binary di 4. Repeat the steps until the quotient is equal to 0 Example #1 Convert 13), to binary: Division Quotient Remainder Bit # by2 B2 6 1 0 62 3 0 32 1 1 2 12 0 1 3 So 13,)= 1101, Example #2 Convert 174, to binary POO ee Division by2 Quotient Remainder Bit # 1742 | 87 0 0 87/243 1 I 42 24 1 212 10 1 3 w2 5 0 4 2 1 $s 22 1 0 6 0 1 7 So 174,,= 10101110, Example — Convert decimal fractional number 0.8125 into binary number. Since given number is decimal fractional number, so by using above algorithm performin short multiplication by 2 with integer part. Resultant part (R) Multiplication integer 0.81252x2=1.625 1 Multiplication Resultant integer part (R) 0252x2=050 0 Ox2=0 0 Now, write these resultant integer part, this will be 0.11010 which is equivalent binary fractional number of decimal fractional 0.8125 6. Decimal to octal Example ~ Conyert decimal number 210 into octal number. Since given number is decimal integer number, so by using above algorithm performing short division by 8 with remainder. Division Remainder (R) cs te 3/8=0 3 Now, write remainder from bottom to up (in reverse order), this will be 322 which is equivalent octal number of decimal integer 210. DOC as eer Example ~ Convert decimal fractional number 0.140869140625 into octal number. Since given number is decimal fractional number, so by using above algorithm performing short multiplication by 8 with integer part. Multiplication Resultant integer part (0.140869 140625x8 =0,12695313 0.126953 13 x $=0.01562504 1 0.01562504 x $=0.12500032 oO. 0.1250003 0.00000256 1 0,00000256 x $=0.000020544 0. and soon ... Now, write these resultant integer part, this will be approximate 0.11010 which is equivalent octal fractional number of decimal fractional 0.140869 140625. 7. Decimal to hexadecimal Example ~ Convert decimal fractional number 0.06640625 into hexadecimal number. Since given number is decimal fractional number, so by using above algorithm performing short multiplication by 16 with integer part Multiplication Resultant integer part 0.06640625x 16=1.0625 1 0.0625 x 161.0 1 Ox 160.0 6 Now, write these resultant integer part, this will be approximate 0.110 which is equivalent hexadecimal fractional number of decimal fractional 0,06640625. & Octal to decimal A regular decimal number is the sum of the its multiplied with 10°. Example #1 137 in base 10 is equal to each digit multiplied with its corresponding 10°: 137, = 1s10"43% 10'+7% 10" = 10043047 Octal numbers are read the same way, but each digit counts 8" instead of 10° DOC as eer Multiply each digit of the hex number with its correspondi Example #2 37 in base 8 is equal to each digit multiplied with its corresponding 8* 37, 3481478" = 2447 = 31 9, Octal toBinary ‘Octal Symbol Binary equivalent 0 000 1 001 2 010 3 ou 4 100 5 101 6 110 7 i This method is simple and also works as reverse of Binary to Octal Conversion, The algorithm is explained as following below. + Take Octal number as input + Convert cach digit of octal into: binary + That will be outputas binary number. Example-1 Convert octal number 540° into binary number. According to above algorithm, equivalent binary number will be, (540), (101 100 000), (201100000), This is very simple conversion, you can use for mixed (integer with fractional) octal number as well Example-2- Convert octal number 352.563 into binary number. According to above algorithm, equivalent binary number will be, (352.563), (O11 101 010. 101 110011), (011101010.1011 10011), 10, Octal to Hexadecimal Convert 536 from octal to hexadecimal number Convert 6(octal) into its binary equivalent we get 6), (iol) (01) (110) (101011110), DOC as eer Now forming the group of 4 binary bits to obtain its hexadecimal (1O1011110),= (001) IOI) 1110) (SE), equivalent, So the hexadecimal number of 336 is 15E. 11. Hexadecimal to Decimal Example-1— Convert hexadecimal number ABCDEF into decimal number. Since value of Symbols ~ A, B, C, D, E, F are 10, 11, 12, 13, 14, 15 respectively. Therefore equivalent decimal number is, {(ABCDEF),, (10x 16° 1 Lx16"+12416 13x 16 + 14x 16'+ 15x16 Nie (10485760+720896+491524+3328 24+15)., (11259375),_ which is answer. Exampl ‘Convert hexadecimal number LE.01B into decimal number. Since value of Symbols: B and F are 11 and 15 respectively. Therefore equivalent decimal number is, (IF.O1B),, (1x16 461 5x16" 40x16 41x16 +1 1x16"), G1.0065918),, which is answer 12, Hexadecimal to Binary 0001 | 1010 | 1100 | 0101 Binary Number 13. Hexadecimal to octal (ADs Hexadecimal number Z ce erted bi f (00011010): ‘hexadecimal i 7 000 011 010 ->Groupedbinary value Yow d a _—p Octal of each grouped binary number (Aje= (G22 Converted Octal of Hex Exampl Convert 1BC,, into an octal number. Solution: Given, 1IBC,,is a hexadecimal number, 1 0001, B— 1011, C 1100 Now group them from right to left, each having 3 digits. 000, 110, 111, 100 POO ee 000-0, 110 6, 1117, L004 As the binary system has base r = 2. So the two types of complements for the binary system are complement and 1's complement I's complement The I's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is called as taking complement ot I's complement Example of I's Complement is as follows. Given number —] 1 oO 2's complement The complement of binary number is obtained by adding | to the Least Significant Bit (LSB) of 1's complement of the number. complement = I's complement + 1 Example of 2's Complement is as follows. LI | tscompioent—

You might also like