Notes on Data Representation

July 5, 2016    

Dear Aspirant,

As you know Computer is very important section to get a good score for Bank Exam 2016.Today we are covering the study material on data representation that will help you succeed in the upcoming exam for Bank.

There are two basic types (character and number)of data, which are stored and processed by the computer.

Data Representation : It refers to the internal method used to represent various types of data stored on a computer. Computers use different types of numeric codes to represent various forms of data, such as text, number, graphics and sound.

To know data representation in computer we must know following number system

  • Decimal number system (Base=10):- 0,1,2,3,4,5,6,7,8,9.
  • Binary number system (Base=2):- 0,1.
  • Octal number System (Base=8):- 0,1,2,3,4,5,6,7.
  • Hexa Decimal System(Base =16):- 0,1,2,3,4,5,6,7,8,9,A(10),B(11),C(12),D(13),E(14),F(15).

A repeated division and remainder algorithm can convert decimal to binary, octal, or hexadecimal.

  • Divide the decimal number by the desired target radix (2, 8, or 16).
  • Append the remainder as the next most significant digit.
  • Repeat until the decimal number has reached zero.

1
Decimal to Binary:

The decimal (base ten) numeral system has ten possible values (0,1,2,3,4,5,6,7,8, or 9) for each place-value. In contrast, the binary (base two) numeral system has two possible values represented as 0 or 1 for each place-value.

  • Example of using repeated division to convert 1792 decimal to binary:

2

Decimal to Octal:

  • Example of using repeated division to convert 1792 decimal to octal:

3_3

Decimal to Hexadecimal

  • Example of using repeated division to convert 1792 decimal to hexadecimal:

4 The only addition to the algorithm when converting from decimal to hexadecimal is that a table must be used to obtain the hexadecimal digit if the remainder is greater than decimal 9.

5

The addition of letters can make for funny hexadecimal values.

For example, 48879 decimal converted to hex is:

6
 Other fun hexadecimal numbers include: AD, BE, FAD, FADE, ADD, BED, BEE, BEAD, DEAF, FEE, ODD, BOD, DEAD, DEED, BABE, CAFE, C0FFEE, FED, FEED, FACE, BAD, F00D, and my initials DAC.

Octal To Binary

Converting from octal to binary is as easy as converting from binary to octal. Simply look up each octal digit to obtain the equivalent group of three binary digits.

7

Octal to Hexadecimal

When converting from octal to hexadecimal, it is often easier to first convert the octal number into binary and then from binary into hexadecimal. For example, to convert 345 octal into hex:

[According to previous example]

Octal  = 3 4 5
Binary = 011 100 101 = 011100101 binary

Drop any leading zeros or pad with leading zeros to get groups of four binary digits (bits):
Binary 011100101 = 1110 0101

Then, look up the groups in a table to convert to hexadecimal digits.

8

Octal to Decimal

Converting octal to decimal can be done with repeated division.

  1. Start the decimal result at 0.
  2. Remove the most significant octal digit (leftmost) and add it to the result.
  3. If all octal digits have been removed, you’re done. Stop.
  4. Otherwise, multiply the result by 8.
  5. Go to step 2.

9

The conversion can also be performed in the conventional mathematical way, by showing each digit place as an increasing power of 8.

345 octal = (3 * 82) + (4 * 81) + (5 * 80) = (3 * 64) + (4 * 8) + (5 * 1) = 229 decimal

Converting from hexadecimal is next.

Converting from hexadecimal to binary is as easy as converting from binary to hexadecimal. Simply look up each hexadecimal digit to obtain the equivalent group of four binary digits.

10

Hexadecimal to Octal

When converting from hexadecimal to octal, it is often easier to first convert the hexadecimal number into binary and then from binary into octal. For example, to convert A2DE hex into octal:

(from the previous example)

Hexadecimal = A 2 D E
Binary = 1010 0010 1101 1110 = 1010001011011110 binary

Add leading zeros or remove leading zeros to group into sets of three binary digits.

Binary: 1010001011011110 = 001 010 001 011 011 110

Then, look up each group in a table:

11

Binary = 001 010 001 011 011 110
Octal = 1 2 1 3 3 6 = 121336 octal

Therefore, through a two-step conversion process, hexadecimal A2DE equals binary 1010001011011110 equals octal 121336.

Hexadecimal to Decimal

Converting hexadecimal to decimal can be performed in the conventional mathematical way, by showing each digit place as an increasing power of 16. Of course, hexadecimal letter values need to be converted to decimal values before performing the math.

@1

A2DEhexadecimal:

= ((A) * 163) + (2 * 162) + ((D) * 161) + ((E) * 160)
= (10 * 163) + (2 * 162) + (13 * 161) + (14 * 160)
= (10 * 4096) + (2 * 256) + (13 * 16) + (14 * 1)
= 40960 + 512 + 208 + 14
= 41694 decimal

Arithmetic operation in Binary Systems

Addition

Rules for carrying out binary Additions are :

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 0 with one (1) carry over.

Example

1. For adding 1011102 and 1111012

Thus 1101011 in binary system is equivalent to 107 in decimal system.

Subtraction

Rules for carrying out binary subtraction are :

  1. 0 – 0 = 0
  2. 0 – 1 = 1 with one borrow
  3. 1 – 0 = 1
  4. 1 – 1 = 0

Examples

  1. For subtracting 101110 from 1111012

Thus 001111 in binary system is equivalent to 15 in decimal system.

Multiplication

The rules for the multiplication are :

Example:

Multiplying 111101 with 1110

Division

The rules for division are same in binary system as those in decimal number system.

This is same as division of decimal 36 with 6.

Thanks,

Gradeup.

Get more Computer Notes, Exams, SBI PO, Study Notes related tests, articles on your Android Phone. Install Now!

Let's block ads! (Why?)

Notes on Data Representation 4.5 5 Yateendra sahu July 5, 2016 Dear Aspirant, As you know Computer  is very important section to get a good score for Bank   Exam 2016 .Today we are covering the study ma...


Load comments

No comments:

Post a Comment