You are on page 1of 21

DIGITAL SYSTEMS 1 with VHDL

by

Dr. A. Benzekri

UMBB/IGEE
Department of Electronics

Number Systems and Data Representations 1


Objectives
This chapter is about number systems in
general and the binary system in particular

The concept of number system


Positional and non-
non-positional number systems
The binary number system
Methods for converting between various radix
systems
Discuss complements and signed numbers

Number Systems and Data Representations 2


Objectives….
Understand the fundamental concepts of
floating point numbers representations (how
real numbers are represented in digital
computers) and floating point arithmetic
operations..
operations

Gain familiarity with codes that computers


use to represent both numerical and
character information: BCD, Gray, EBCDIC,
ASCII

Number Systems and Data Representations 3


Introduction
Definitions
Number
A number is a mathematical quantity usually
correlated with something. In electronics for
example, it is often correlated to a physical
quantity such as: voltage, current, resistance, etc.

Number System
A number system is a language for representing
numbers using distinct symbols or digits.
We distinguish two major number system
notations: positional and non-positional.
Number Systems and Data Representations 4
Positional Notation
In a positional notation number system, the
position a symbol or digit occupies in the number
determines the value it represents.
Example: Decimal number system.

Number Systems and Data Representations 5


Non--Positional Notation
Non
The non-positional number system consists of a
limited number of different symbols, where each
symbol has a fixed value irrelevant of its position
in the number.
Examples:
Roman
Tally

Number Systems and Data Representations 6


Roman Number System

Number Systems and Data Representations 7


Roman Number System
The reading is done from left to right. We add the
values of two numerals if a numeral is followed by
one having equal or lower value.
Example
CX = 100 + 10 = 110
XX = 10 + 10 = 20
If a numeral with a smaller value is followed by a
numeral having higher value, the smaller is
subtracted from the higher one. Example
IV = 5 – 1 = 4
M CM XCV = 1000 + (1000 - 100) + (100 – 10) + 5
= 1995
Number Systems and Data Representations 8
The Tally Number System

Number Systems and Data Representations 9


Radix of a Number System

The radix (or base), noted r, of a number


system indicated the number of distinct digits
or symbols is possesses including the zero
used to represent numbers in that number
system.
It is a whole number larger than or equal to 2.
(r 2)2)

Number Systems and Data Representations 10


Positional Number Systems

Consider the following decimal number


(N)10 = (1234)10.
This number means
(N)10 = (1234)10
= 1000 + 200 + 30 + 4
= 1x103 + 2x102 + 3x101 + 4x100

Number Systems and Data Representations 11


Positional Number Systems….

In general, an n-
n-digit natural number N in base
r, noted (N)r, can be written in two forms

Number Systems and Data Representations 12


Positional Number Systems….

Number Systems and Data Representations 13


Positional Number Systems….

Number Systems and Data Representations 14


Positional Number Systems….

Number Systems and Data Representations 15


Positional Number Systems….

Number Systems and Data Representations 16


Binary Number System

The binary number system has radix 2.


It uses symbols 0 and 1 to represent
binary numbers. In this number
system, the digit is often called BIT,
the contraction of BInary digiT
digiT..

Number Systems and Data Representations 17


Conversion Between Bases

The we will demonstrate how to


convert a given number in any base to
its equivalent in any other base.
We will begin with the conversion of
unsigned numbers. Conversion of
signed numbers will be presented
later.

Number Systems and Data Representations 18


Binary to Decimal Conversion

The binary number (N)2 is converted into


decimal by applying the polynomial form (eq-
(eq-6)
and performing arithmetic in decimal.
decimal.
Number Systems and Data Representations 19
Base--r to Decimal Conversion
Base

The process to convert a given number


in base r, (N)r, to decimal is similar to
binary--to-
binary to-decimal conversion except that
multiplications are done by powers of r
instead of powers of 2. 2.

Number Systems and Data Representations 20


Base--r to Decimal Conversion...
Base

Try to go through these slides at least 2 times


Number Systems and Data Representations Dr. A.Benzekri 21

You might also like