1 Information Representation
1 Information Representation
Information Representation
Denary Number Systems:- Number Conversions:-
- Are the the natural number systems
27=128 26=64 25=32 24=16 23=8 22=4 21=2 20=1
- Base 10 means 10 symbols
- 0,1,2,3,4,5,6,7,8,9 0 1 1 0 1 1 0 1
- Least Significant Digit on the Right Hand Side Binary to Denary:-
- 346 is represented by Converting a binary byte (8 bits) 01101101 to Denary by adding the
corresponding values on the first row all the bits that are valued ‘1’.
Binary Number Systems:-
therefore 64+32+8+4+1 = 109
All hardware is manufactured to recognise only two
states i.e. 1 and 0. Denary to Binary:-
- for machine (HW) binary number system is used. converting denary
- it is base 2 means just represented by 1 or 0 246 to binary…results in
- each digit in binary number is referred to as bit. 11110110. à
- all data is represented using binary code. Largest value that a byte
Hexadecimal Number Systems:- can hold is 25510 which
- Documenting computer code (binary) in difficult therefor we means 11111111
can use Hexadecimal to make it more compact and more
understandable.
- Binary data can be converted to hexadecimal. Hex and Binary Conversion:-
- Base 16 means 16 Symbols Each hex digit is treated separately and equivalent to 4 bits
- 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F (nibble).
5 = 0101 6 = 0110 A = 10 = 1010, B = 11= 1011,…F = 15 = 1111
therefore,
4A will be 0100 1010
and 1110 1111 0101 will be E F 5
Negative Binary Numbers:- 0 1 1 0 0 1 1 0 Original Number
The compute can store numbers in either unsigned or
signed. They are both store in the form of bits. If we 1 0 0 1 1 0 0 1 One’s Complement
allocate two bytes 16bits (2bytes) then the range of values
can be 216 – 1 i.e. 0 to 65,535. 1 Two’s Complement
*One of the advantages of using two’s complement representations is that it simplifies the process of subtracting one
number from another. The number being subtracted is converted to its two’s complement form, which is then added to
the other number.
Binary Arithmetic: For binary subtraction, starting at the least significant position still applies. The rules for
For binary addition, starting at the least significant the subtraction of binary digits are:
position still applies. The rules for the addition of binary • 0–0=0 10 10
digits are: • 0 – 1 = 1 after a borrow 1 10 10 0
• 0+0= 0 • 1–0=1
• 0+1= 1 • 1–1=0 - 1 0 1 1
• 1+1= 0 with a carry of 1 Consider the an example 0 0 1 1
• 1+1+ 0 = 0 with a carry of 1 When the values in a computer system are stored in two’s complement form
• 1+1+ 1 = 1 with a carry of 1 this problem has a characteristic behaviour.
The last two rules are used when a carried 1 is included in
the addition of two digits.
1 1
Clearly we need the
1 0 1 1 processor to detect
overflow and output an
+ 1 1 1 0
error message.
1 1 0 0 1 Unit 6 Covers the use of
Status Bits.
When binary addition is carried out by a computer
using internally stored numbers there is a major
difference.
This arises from the fact that the storage unit will always
have a defined number of bits.
For example, in the above addition, if binary values
were limited to being stored in a nibble the result of the
addition would be incorrectly stored as 1001.
This is an example of an overflow. The value produced
is too large to be stored.
Binary Coded Decimal (BCD):-
• If single denary digits need to be stored and displayed
then BCD can present an efficient solution.
• 4 bits (nibble) can be used to represent one digit
therefore allowing 16 different options.
For example the number 8503 can be represented by:-