Data Representation Theory_Notes
Data Representation Theory_Notes
Binary System
- Using binary system the data is represented in two possible state, that is, 0s and 1s, thus in
base 2.
- Most computing devices use binary numbering to represent electronic circuit voltage state,
(i.e., on/off switch), which considers 0 voltage input as off and 1 input as on.
Octal Representation
- It is commonly used as a shorter representation of binary numbers by grouping binary digits
into threes.
- It is also used as a shorthand for representing file permissions on UNIX systems and
representation of UTF8 numbers
Advantages of octal representation
- Easier to work with than binary
- Conversions to and from binary are straight forward
Disadvantages
- Computer does not understand octal number system directly, so we need octal to binary
converter.
Hexadecimal arithmetic
- Hexadecimal can be used to write large binary numbers in just a few digits.
- It makes life easier as it allows grouping of binary numbers which makes it easier to read,
write and understand. It is more human-friendly, as humans are used to grouping together
numbers and things for easier understanding.
- Since computers can't understand hexadecimal, we get a piece of software to convert it to
binary for us.
- Hexadecimal is used to instructional codes in the computer.
1
Advantages of hexadecimal representation
• ASCII-7
- ASCII-7 is a 7-bit standard ASCII code.
- ASCII-7 allows 27 = 128 combinations/128unique symbols to be represented.
• ASCII-8
- It is an extended version of ASCII-7.
- ASCII-8 allows 28 = 256 combinations/256 unique symbols.
- The ASCII table below has 128 characters, with values from 0 through 127.
2
3
Table: ASCII character set
4
Advantages of using BCD
- It is easy to convert a number from BCD to decimal form and vice versa.
- It is also simple to implement a hardware algorithm for the BCD converter.
- No rounding off errors since there is no rounding off numbers when computing fractional
numbers.
UNICODE
- Unicode is a universal character encoding standard for the representation of text which
includes letters, numbers and symbols in multi-lingual environments.
- Uses 16-bits which represent 65536 different characters.
- It is enough to represent characters in any language, even Chinese and hieroglyphics.
- Most Microsoft Software and Linux distributions use UNICODE.