2. Binary to decimal
Steps:
* Multiply each bit by 2n, where n is the “weight” of the
bit
* The weight is the position of the bit, starting from 0 on
the right
* Add the results
Ex:
10112 => 1 x 20 = 1
1 x 21 = 2
0 x 22 = 0
1 x 23 = 8
1110
3. Octal to Decimal
Steps:
* Multiply each bit by 8n, where n is the “weight” of the
bit
* The weight is the position of the bit, starting from 0 on
the right
* Add the results
Ex:
7248 => 4 x 80 = 4
2 x 81 = 16
7 x 82 = 448
46810
4. Hexadecimal to Decimal
Steps
* Multiply each bit by 16n, where n is the “weight” of the
bit
* The weight is the position of the bit, starting from 0 on
the right
* Add the results
Ex:
ABC16=>C x 160 = 12 x 1 = 12
B x 161 = 11 x 16 = 176
A x 162 = 10 x 256 = 2560
274810
5. Decimal to Binary
* Divide by two, keep track of the remainder
* First remainder is bit 0 (LSB, least-significant
bit)
* Second remainder is bit 1
EX
7510 = ?2
2 75
2 37 – 1
2 18 – 1
2 9 – 0
2 4 – 1
2 2 – 0
1 – 0
10010112
6. Octal to Binary
* Convert each octal digit to a 3-bit equivalent binary
representation.
Ex:
2078 = ?
2 0 7
010 000 111
0100001112
7. * The digital data is represented, stored and transmitted as
group of binary bits. This group is also called as binary code.
* The binary code is represented by the number as well as
alphanumeric letter.
8. * Binary codes are suitable for the computer applications
and digital communications.
* Binary codes make the analysis and designing of digital
circuits if we use the binary codes.
* Since only 0 & 1 are being used, implementation
becomes easy.
9. It is classifed into different categories
* Weighted Codes
* Non-Weighted Codes
* Binary Coded Decimal Code
* Alphanumeric Codes
* Error Detecting Codes
* Error Correcting Codes
10. Weighted Codes
* Binary code use the positional weight principle.
* Each position of the number represents a specific
weight
* decimal digit is represented by a group of four bits.
11. Non weighted codes
Excess 3 code
* It is non-weighted code used to express decimal
numbers. The Excess-3 code words are derived from the 8421
BCD code words adding (0011)2 or (3)10 to each code word in
8421s-3 codes
13. * Gray code evaluates the nature of binary code or data
that is composed of on and off indicators, commonly
represented by ones and zeros.
* Gray code is also known as reflected binary code.
* only one bit will change each time the decimal number
is incremented
* IT cannot be used for arithmetic operation.
14.
15. * A binary digit it has only two states '0' or '1‘.
But this is not enough for communication .So alphanumeric
codes are used.
* The alphanumeric codes are the codes that represent
numbers and alphabetic characters.
* It represent 10 digits and 26 letters of alphabet i.e. total
36 items.
* American Standard Code for Information Interchange
(ASCII). - 7 bit - commonly used
* Extended Binary Coded Decimal Interchange Code
(EBCDIC). – 8 bit code
* Five bit Baudot Code.
* Above three alphanumeric codes are very commonly
used
16. Error deducting codes
* Error is a condition when the output information does
not match with the input information.
* we use error-detecting codes to find a data is
scrambled by noise or data may get corrupted.
* We use parity check to deduct error.
Parity checking
* technique to deduct error.
* ASCII character has 7 bit for a parity we are using 8th
bit i.e parity.
17. The parity of 8-bits transmitted word can be either even parity
or odd parity.
Even parity -- Even parity means the number of 1's in the
given word including the parity bit should be even (2,4,6,....).
Odd parity -- Odd parity means the number of 1's in the given
word including the parity bit should be odd (1,3,5,....).
18. Use of Parity Bit
* The parity bit can be set to 0 and 1 depending on the
type of the parity required.
* For even parity, this bit is set to 1 or 0 such that the no.
of "1 bits" in the entire word is even.
* For odd parity, this bit is set to 1 or 0 such that the no.
of "1 bits" in the entire word is odd.
19. How parity checking works
* The receiver can detect the presence of an error if the
parity of the receiver signal is different from the expected
parity.
i.e if it is known that the parity of the transmitted signal
is always going to be "even" and if the received signal has an
odd parity, that the received signal is not correct.
* If an error is detected, then the receiver will ignore the
received byte and request for retransmission.
20. Data Representation
* We use many different data forms .
* One of the commonly used data form is decimal form.
Data types
* Data is commonly stored as a series of 8 bits which is
equal to one byte.
* Information can be given in any form to computer as
audio, video, digits, pictures etc.
* Computer’s memory required to store these forms must
be large enough to handle such forms of information.
22. * The data types found in registers of digital computers
may be classified as (1) Characters.
* Series of these characters can be taken as String.
* Numbers used in arithmetic computations.
* These can be represented in two forms integers and real
numbers.