DATA LINES,BITS,NIBBLES,BYTES,WORDS,BINARY AND HEX
Various information inside a computer or on board used is exchanged by using metallic conductors called data lines and group of data.
0 byte value-00000000
Non zero byte-01100010
In C a byte is called a character and is abbreviated char
BIT D7 D6 D5 D4 D3 D2 D1 D0
BASE EXPONENT 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
WEIGHT 128 64 32 16 8 4 2 1
To show a number in hexadecimal in the C language,prefix it with 0x
9B= (9*16)+(11*16 ^0)=155
It would be represent ed as : 0x9B or 0x9b
The following shows the byte table again but this time with the weight also expressed in hexadecimal notation,as often seen in C operations.
BIT D7 D6 D5 D4 D3 D2 D1 D0
BASE EXPONENT 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
WEIGHT 128 64 32 16 8 4 2 1
HEX WEIGHT 0x80 0x40 0x20 0x10 0x08 0x04 0x02 0x01
D8 0x0100
D9 0x0200
D10 0x0400
D11 0x0800
D12 0x1000
D13 0x2000
D14 0x4000
D15 0x8000
For example the decimal number 19070 can be represented as the hexadecimal number 0x4A7E
Various information inside a computer or on board used is exchanged by using metallic conductors called data lines and group of data.
0 byte value-00000000
Non zero byte-01100010
In C a byte is called a character and is abbreviated char
BIT D7 D6 D5 D4 D3 D2 D1 D0
BASE EXPONENT 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
WEIGHT 128 64 32 16 8 4 2 1
To show a number in hexadecimal in the C language,prefix it with 0x
9B= (9*16)+(11*16 ^0)=155
It would be represent ed as : 0x9B or 0x9b
The following shows the byte table again but this time with the weight also expressed in hexadecimal notation,as often seen in C operations.
BIT D7 D6 D5 D4 D3 D2 D1 D0
BASE EXPONENT 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
WEIGHT 128 64 32 16 8 4 2 1
HEX WEIGHT 0x80 0x40 0x20 0x10 0x08 0x04 0x02 0x01
D8 0x0100
D9 0x0200
D10 0x0400
D11 0x0800
D12 0x1000
D13 0x2000
D14 0x4000
D15 0x8000
For example the decimal number 19070 can be represented as the hexadecimal number 0x4A7E
No comments:
Post a Comment