0% found this document useful (0 votes)
64 views5 pages

Number Systems

This document discusses number systems used in microprocessors and interfacing. It defines common terms like bit, byte, and nibble. It explains that different number systems are better suited for different tasks, with binary used in digital electronics due to its representation of high and low states. The document also discusses binary-coded decimal for displaying numbers, hexadecimal for its compact representation of binary data, and ASCII for encoding text characters as numeric values that can be stored in memory.

Uploaded by

shakil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views5 pages

Number Systems

This document discusses number systems used in microprocessors and interfacing. It defines common terms like bit, byte, and nibble. It explains that different number systems are better suited for different tasks, with binary used in digital electronics due to its representation of high and low states. The document also discusses binary-coded decimal for displaying numbers, hexadecimal for its compact representation of binary data, and ASCII for encoding text characters as numeric values that can be stored in memory.

Uploaded by

shakil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Microprocessor and Interfacing

EEE 319

Lecture 1 (Number Systems)

Abdullah Bin Shams

Lecturer
EEE, BUBT
[email protected]
Objective:

1. Define the term bit, nibble, byte, word, MSB and LSB.

2. Necessity of different number systems.

3. American Standard Code for Information Interchange; a character-encoding


scheme (ASCII).

Section I Definition

bit A binary digit (0, 1) is often called a bit.

nibble A 4-bit binary is called a nibble.

byte An 8-bit binary is called a byte.

word An 16-bit binary is called a word.

bit 0
nibble 0000
byte 0000 0000
word 0000 0000 0000 0000

MSB The leftmost bit of a binary word is referred to as the most significant bit.

LSB The rightmost bit of a binary word is referred to as the least significant bit.

Section II Why are number systems required?

Ans: Because some number systems are more optimal than others depending on
the task at hand.
a. Decimal number system

Decimal numbers are used in our daily-life activities.


(e.g. length, cash, mass etc.)

b. Binary number system

The binary system, based on 2, is just another special number system, and is
used by digital electronic devices because digital circuits work on an
electrical on or off two state system, a number system based on 2 is
therefore much easier for electronic devices to use.

Microprocessor performs all kinds of computations, inputs and outputs in the


form of binary numbers. But the input of any number by the user is in the
form of decimal hence decimal to binary conversion is required.

c. Binary coded decimal (BCD)

In digital electronics numbers are displayed with the help of 7-segment


display, which can display numbers ranging from 0 9. Thus to display a
binary number it is first converted to BCD then displayed on multiple 7-
segment displays.
d. Hexadecimal number system

For the convenient use of the programmer, it is easier to manipulate


hexadecimal numbers than binary numbers.

16 is a power of 2 (24), so exactly one hex digit can represent the same
sixteen possible values as four bits, hence data compactness is achieved. For
example, byte values can range from 0 to 255 (decimal), but may be more
conveniently represented as two hexadecimal digits in the range 00 to FF.
Again example 1101 1010 is the 8-bit binary number which can be
expressed comfortably as DA in the hexadecimal form.

Hexadecimal is used by convention when referring to memory addresses:


e.g. address 0x1000, address 0x4002, where 0x denotes a hexadecimal
value.

In computers, the main numeral systems are based on the positional system
in base 2 (binary numeral system), with two binary digits, 0 and 1. Positional
systems obtained by grouping binary digits by three (octal numeral system)
or four (hexadecimal numeral system) are commonly used.

For very large integers, bases 232 or 264 (grouping binary digits by 32 or
64, the length of the machine word) are used.

Section III ASCII

Memory can store data in the form of 0s and 1s only. A number is stored in the
memory in its binary equivalent.

To store alphanumeric symbols or characters, we have to assign each character a


value which can be stored in the memory in binary form.

ASCII is a standard used to encode alphanumeric and other characters associated


with text.
Example: The word hello using ASCII

Note:
Each character is stored in a single byte value (8 bits).
ASCII only uses 7 bits, giving 128 possible characters (Max. value 7F).
Only 96 of the ASCII characters are printable.
Remaining values are control codes.
The number 0 9 is not the same as the character 0 9.
The characters 0, 1, ... , 9 are used in text to display values in human
readable form.

You might also like