it systems what number? en230-1 justin champion c208 – 3273
Post on 19-Dec-2015
216 views
TRANSCRIPT
IT SystemsWhat Number? EN230-1
Justin Champion
C208 – 3273www.staffs.ac.uk/personel/engineering_and_technology/jjc1
IT Systems We usually use the decimal system to represent
numbers 0,1,2,3,4,5,6,7,8,9 Commonly referred to as Base 10
Machines as seen previously work on the basis of on or off These numbers are represented by 1 or 0
• Commonly known as Binary or Base 2• This binary can be used to represent any of the decimal numbers
IT Systems Each bit in a binary number has a decimal value
Below is a table for a 8-bit binary number
Dec 128 64 32 16 8 4 2 1
Bin 1 1 1 1 1 1 1 1
27 26 25 24 23 22 21 20
IT Systems There can be any number of bits/switches Each of those bits would be a switch
0 = off 1 = on
20212223
1248
IT Systems Each of the bits with are on (1) are added together
This example is Value = 8 + 1 Value = 9
20212223
1248
IT Systems Another example
What is this Value Value = 128 + 64 + 16 + 8 +1 Value = 217
20212223
1248
24
16
25
32
26
64
27
128
IT Systems Significant Bits
Most significant bit• This indicates if there was a change in the binary which part of the
number would have the most effect. Least significant bit
• This indicates if there was a change in the binary which part of the number would have the least effect.
Usually• The most significant bit is the one furthest to the left• Least significant bit is the one furthest to the right
Changes• This is however not the always the case and knowledge of the hardware
and software being used is required• Using encryption is an example where this may change
000000000101010
Most significant bit Least significant bit
IT Systems Significant Bits Conitnued
Another term which is used for this is• Big Endian
• The part of the sequence which has the most effect
• Little Endian• The part of the sequence which has the least effect
000000000101010
Big Endian Little Endian
IT Systems Another example
What is this value? Value = 1099511627775
1111111111111111111111111111111111111111
Take your time working it out !!!!!
IT Systems Why did it take so long to work out ???
There was too many digits you for you to work out The computer would have no problems at all with this
Different number systems We use different number systems to keep it easier to understand for us
Hexadecimal This number system is based upon base 16
Pub quiz question The term hexidecimal comes from the words Greek work Hexa meaning 6 Latin word Decimal meaning 10
IT Systems Hexadecimal lookup table
0 - 16
Hex Dec Hex Dec0 0 8 8
1 1 9 9
2 2 A 10
3 3 B 11
4 4 C 12
5 5 D 13
6 6 E 14
7 7 F 15
IT Systems Hexadecimal
Examples• Decimal 16 = Hex F• Decimal 11 = Hex B• Decimal 27 = Hex 1B• Decimal 64 = Hex 40
Dec Binary Hex0 00000000 01 00000001 12 00000010 23 00000011 34 00000100 45 00000101 56 00000110 67 00000111 78 00001000 89 00001001 910 00001010 A11 00001011 B12 00001100 C13 00001101 D14 00001110 E15 00001111 F
IT Systems Converting between types quickly
Use a calculator ! Ruling that out
Binary to Hexadecimal Break each part into 4 bits If you do not have multiples of 4 then add zeros at the
beginning Calculate each part using the lookup table Put the Hex characters together You have the answer
IT Systems Worked Example
Try this yourself with 11000011
00100110 in Hex
Binary 0010 0110 Hex 2 6
Answer = 26 Hex
IT Systems Usually a symbol is used to indicate what number
types is used Not a problems with binary, but with the others maybe a
problem Hex is usually done by 34f2h
• A h at the end of the number• A $ is used in the programming to indicate hex
IT Systems Conversion between Hex and Decimal
2F.4A to Decimal
(2 * 161) + (15 * 160) + (4 * 16-1) + (10 * 16-2) = 47.74
IT Systems Character representation
We have covered numbers One of the main uses of computers is the movement of
text A standard format is used for text characters called ASCII ASCII = American Standard Code for Information
Interchange This allows for the transfer of characters between
computers and both understanding what was sent.• Issues are common between sending characters between
different operating systems, Panther (Apple), Unix and Windows
IT Systems ASCII
Represented by a 7 bit binary value
H E L L O T H E R E !72 69 76 76 79 32 84 72 69 82 69 33
IT Systems UNICODE
Although ASCII is a worldwide standard UNICODE is a new standard Uses 8bits to represent the characters Supports a larger number of character sets
• Currently supports 34,168 characters Still being expanded Used in the new (Win2000 and above) windows operating
systems. May become popular in the future if other OS’s accept
the standard.• Not that widely used at the moment