Representation+of+Data

To understand how a bit pattern can convey information, consider someone who wants to give a signal (or send a code) to another person, but has only a single light bulb at his disposal. How many different messages (codes) can he send? Two, one for light ON and the other for light OFF. What if he had two bulbs? At first thought one might say he can now send three signals corresponding to: This would be fine if he only wanted to send three signals. But what if he wanted to send four signals? Would he need another bulb? The answer is no, he can send four signals with two light bulbs, but the sender and receiver (of the signals) would have to come to an agreement concerning case (3), above; that is, when one light is ON, it must be distinguished from the case where the other light is ON. For instance, if the bulbs are A and B, then ‘A ON’ and ‘B OFF’ is a different code to ‘A OFF’ and ‘B ON’. Computer circuits, however complex can be broken down into simpler and simpler subcircuits until we reach the fundamental building block from which the entire computer is made. This building block is the electronic switch. The electronic switch is a circuit designed to always be in one of two states: ON or OFF. These states are similar to the positions of a physical switch. When we use a computer to process information, the information is in binary form at every point of the process, from input to output. When you enter a document or a command you use the letter A-Z (both upper and lower cases), the number 0-9, and various other characters such as, *, =, + etc. Human beings understand these characters or symbols but the computer does not. In order for the computer to understand human information, this information must be digitised or converted to a format that the computer can understand and process. The computers understand information coded using 1s and 0s- Binary. = BITS, BYTES AND NIBBLES  =
 * CODING SCHEMES **
 * 1) both OFF;
 * 2) both ON;
 * 3) one ON.

4 bits = 1 nibble 8 bits = 1 byte 2 bytes = 1 word 2 words = 1 long word 1 kilobyte = 210 bytes = 1024 bytes 1 megabyte = 220 bytes = 1024 kb 1 gigabyte = 230 bytes = 1024 MB  1 terabyte = 240 bytes = 1024 GB =  BINARY CODING SCHEMES  = The two main coding schemes use by computers to represent data are ASCII and EBCDIC: § ASCII: American Standard Code for Information Interchange - Uses 7 bits to represent a character - Created by the USA government for use in micro and mini computers § EBCDIC: Extended Binary Coded Decimal Interchange Code - Uses 8 bits to represent a character - Created by International Business Machines (IBM) for use in super and mainframe computers.
 * Bits in coding scheme || Possible combination of 1s and 0s || Size of character set ||
 * 2 || 1,01,10,00 || 22 characters can be represented ||
 * 3 || 111,110,100,001,011,101,010,000 || 23 characters can be represented ||
 * ASCII (7) || … || 27 characters can be represented ||
 * EBCDIC (8) || … || 28 characters can be represented ||
 * ASCII (7) || … || 27 characters can be represented ||
 * EBCDIC (8) || … || 28 characters can be represented ||

The coding schemes use by the computer determines the character set of the computer and the ability of the computer to display graphics and other information. The table above illustrates the character set depending on the amount of bits in the coding scheme. The ASCII coding scheme can represent 27 or 128 different characters. This includes all the letters of the alphabet, lower and upper case, the digit, special symbols and other graphics and control characters. = Bus line  = A bus is line electronic pathway on which data travels between the primary components of the computer. The bus width determines the amount of data that can be carried at one time. Early microcomputer had a bus size of 8 bits so they could carry one character at a time. The present generation of microcomputers have bus sizes of 32 or 64 bits so they can carry four or eight counterpart. Some super computers have a bus size of 128 bits. If you type in the letter “A” it is converted to the binary “01000001” by your keyboard which sends the information to the CPU. The binary codes are sent to the CPU as a series of electronic pulses, maybe 5 volts represent 0. The pulses travel to the CPU along BUS LINES where they are stored electrically.

BINARY ALGEBRA
Digital computers use Binary Place Notion to store and represent values. The binary digit 0 and 1 only, are used in binary strings. A binary string is a sequence of two or more bits. Similar to the decimal system makes use of the position of each bit to determine the value represented by the binary number.

Conversion from decimal to binary
A simple method is to divide the decimal number repetitively by 2 recording the remainder in the next binary digit position, from bottom to top.

Conversion from binary to decimal
Values represented in binary strings can be converted to their decimal equivalent by adding the set decimal place values.

Addition of binary number
0 + 0 = 0 1 + 0 = 1  0 + 1 = 1  1 + 1 = 0 carry 1 1 + 1 + 1 = 1 carry 1

Converting a –ve decimal number to binary using sign & magnitude method

 * 1) Convert the decimal number to its binary value, ignoring the negative sign.
 * 2) Extend the bits to the appropriate length (i.e. **one less than the size of the bit**-**string**), by attaching 0s to the leftmost part of the bit string.
 * 3) Attach a 1 to the leftmost part of the bit string. The 1 is the sign bit it indicates that the number is negative. Alternatively, a 0 indicates that the number is positive.

Convert a sign & magnitude number to its decimal equivalent

 * 1) Convert the binary number to its decimal value ignoring the leftmost it in your calculations.
 * 2) If the leftmost bit is a 1 then the number is negative otherwise it is positive.

Ones Complement
To convert a binary number to its ones complement representation you change all the ones (1) to zeroes (0) and the zeroes (0) to one (1) Twos Complement. The twos complement of a binary number is formed by finding its ones complement and adding a one.

Converting a Negative decimal number to binary using the Twos Compleme nt

 * 1) Convert the number to its binary value ignoring the sign
 * 2) Extend the bit string to the appropriate length (i.e. **one less than the size of the bit**-**string**), by attaching 0s to the leftmost part of the bit string.
 * 3) Find the ones complement
 * 4) Find the twos complement
 * 5) Attach a 1 to the leftmost part of the bit string. The 1 is the sign it indicates that the number is negative.

Converting a Positive decimal number to binary using the Twos Complement
To convert a positive binary number to its twos complement representation, we execute the following steps:
 * 1) Extend the bit string to the appropriate length (i.e. **one less than the size of the bit**-**string**), by attaching 0s to the leftmost part of the bit string.
 * 2) Attach a 0 to the leftmost part of the bit string, the 0 indicates that the binary number is positive

Converting a binary Twos Complement number to its decimal equivalent
Convert the binary number to its decimal equivalent, making the leftmost bit (the sign bit) binary place value negative.

Subtraction of Binary
To subtract two binary numbers using twos complement method, **we convert both** **numbers to their twos complement representation and add them**. To convert a positive binary number to its twos complement representation, we execute the following steps: Binary Coded Decimal (BCD) An alternative representation of integers is simply to represent the individual numerals which comprises them. This approach is consistent with the way in which we represent numbers ourselves. When we write the number 879, we are choosing to represent this number as three numerals: 8 (representing 800), 7 ( representing 70), 9(representing 9). So, we could convert this number to a binary form by converting each of the integers, one at a time, into binary a binary code. Such a scheme is referred to as binary coded decimal form, or BCD. The BCD codes commonly used to represent numerals are: 1   2    3    4    5    6    7    8    9  ||  0000    0001    0010    0011    0100    0101    0110    0111    1000    1001  ||
 * 1) Extend the bit string to the appropriate length(i.e. **one less than the size of the bit**-**string**), by attaching 0s to the leftmost part of the bit string.
 * 2) Attach a 0 to the leftmost part of the bit string, the 0 indicates that the binary number is positive
 * Numeral BCD Representation ||
 * 0

Using this scheme, we can represent any number by a string of binary digits. media type="youtube" key="ETsfylK7kzM" width="504" height="377" = =