Number Representation
Number Representation
Number Representation
1 Number
Representation
SYALLABUS
1) Binary to decimal:
Conversion of (01101110)2=(110)10
2) Hexadecimal to decimal:
1) Decimal to Binary
Conversion of
(4215)10=(1000001110111)2
2) Decimal to Hexadecimal
Conversion of
(10767)10=(2A0F)16
“
To convert hexadecimal to binary or binary
to hexadecimal; what you can do is first
convert the corresponding number system to
decimal, then convert the corresponding
decimal value to the number system you want
to.
Complements
In the ASCII character set, each binary value between 0 and 127 is
given a specific character. Most computers extend the ASCII character
set to use the full range of 256 characters available in a byte. The
upper 128 characters handle special things like accented characters
from common foreign languages.You can see the 127 standard ASCII codes
below. Computers store text documents, both on disk and in memory,
using these codes. For example, if you use Notepad in Windows OS to
create a text file containing the words, "Four score and seven years
ago," Notepad would use 1 byte of memory per character (including 1
byte for each space character between the words - ASCII character 32).
When Notepad stores the sentence in a file on disk, the file will also
contain 1 byte per character and per space.
Standard ASCII Character SET
If you were to look at the file as a computer looks at it, you would find
that each byte contains not a letter but a number -- the number is the ASCII
code corresponding to the character (see below). So on disk, the numbers for
the file look like this:
Four and Seven (example)
F o u r <spc> a n d <spc> S e v e n
70 111 117 114 32 97 110 100 32 115 101 118 101 110
▪The BIOS in many personal computers stores the date and time in BCD
because the MC 6818 real-time clock chip used in the original IBM PC AT
motherboard provided the time encoded in BCD. This form is easily
converted into ASCII for display.
▪The Atari 8-bit family of computers used BCD to implement floating-point
algorithms. The MOS 6502 processor used has a BCD mode that affects the
addition and subtraction instructions.
▪Early models of the PlayStation 3 store the date and time in BCD. This
led to a worldwide outage of the console on 1 March 2010. The last two
digits of the year stored as BCD were misinterpreted as 16 causing an
error in the unit's date, rendering most functions inoper
��
Thanks!
Any questions?