ES IoT 1
ES IoT 1
• Binary
• Decimal
• Octal
• Hexadecimal
• BCD Number System
• Number Conversion
Types of Number Systems
Decimal Binary
Number
Systems
Octal Hexadecimal
List of Numbers
Decimal 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Binary 2 0, 1
Octal 8 0, 1, 2, 3, 4, 5, 6, 7
Hexadecimal 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Binary to Decimal - Integer
Binary to Decimal – Floating Point
Octal to Decimal
Hexadecimal to Decimal
Decimal to binary
Decimal to Octal
Decimal to Hexadecimal
Fractional Decimal to Binary
Number systems
Binary to Octal
Octal to Binary
DSD UNIT I 16
Binary to Hex
Hexadecimal to Binary
Octal to hexadecimal
Hexadecimal to octal
Exercise
• Convert decimal 153 to octal • Convert decimal 0.153 to octal
• Determine the base numbers for the following operation to be correct.
(5x+4)/4=x+3
5x+4=4x+12
x=8
DSD UNIT I 24
DSD UNIT I 25
exercise
Please perform the following binary addition.
1.00110110+00100100
2.100100+00110
DSD UNIT I 27
complements
DSD UNIT I 28
Decimal
Radix complement:
Ex:(7624)10
sol: r’s complement= r^n-N
Dimnished radix complements:
here r=10;
ex: (7624)10 n=4;
N=7624;
sol: (r-1)’s complement=(r^n-1)-N
10’s complement=(10^4-7624)
here r=10;
=10000-
n=4;
7624
N=7624; =2376
9’s complement=(10^4-1)-7624
DSD UNIT I
=(10000-1)-7624 29
=9999-7624
=2375
=31-10100
=11111-10100
=01011
Note: r’s complement=(r-1)’s copmlement+1
2’s complement=1’s complement+1
DSD UNIT I 31
2’s complement
DSD UNIT I 32
Rules for 2’s complement
1.Leave all least significant Zeros and first 1
unchanged,
2.Replace 1’s with 0’s and 0’s with 1’s on all other
higher significant digits.
DSD UNIT I 35
Signed binary numbers
DSD UNIT I 36
Signed binary
numbers(contd..)
DSD UNIT I 37
DSD UNIT I 38
Represent the following signed numbers with exercise
signed magnitude representation,1’s
complement form, and and 2’s complement
form.
1)-15
2)-25
DSD UNIT I 39
solutions
-15 -25
representation
DSD UNIT I 41
DSD UNIT I 42
Substraction with 9’s complement
DSD UNIT I 43
example
DSD UNIT I 44
Excercise
Perform the substraction of the following
numbers with the help of 10’s complement and
9’s complements
1)6428-3409
2)123-1800
DSD UNIT I 45
solutions
DSD UNIT I 46
Substraction with 2’s complement
DSD UNIT I 47
Substraction with 1’s complement
DSD UNIT I 48
Exercise
Perform the subtraction of the following
numbers with the help of 1’s complement and
2’s complements.
1)10011-10001
2)100010-100011
DSD UNIT I 49
solutions
DSD UNIT I 50
Signed binary substraction
DSD UNIT I 51
Exercise
DSD UNIT I 52
solutions
DSD UNIT I 53
Binary codes
In the coding, when numbers, letters or words are represented by a specific group of
symbols, it is said that the number, letter or word is being encoded. The group of symbols
is called as a code. The digital data is represented, stored and transmitted as group of
binary bits. This group is also called as binary code.
• Weighted Codes
• Non-Weighted Codes
• Binary Coded Decimal Code
• Alphanumeric Codes
• Error Detecting Codes and Error Correcting Codes
DSD UNIT I 54
DSD UNIT I 55
DSD UNIT I 56
DSD UNIT I 57
DSD UNIT I 58
DSD UNIT I 59
DSD UNIT I 60
DSD UNIT I 61
DSD UNIT I 62
Binary-Coded-Decimal (BCD)
DSD UNIT I 63
Binary-Coded-Decimal (BCD)
• The Binary-Coded-Decimal (BCD) code makes conversion much
easier. Each decimal digit, 0 through 9, is represented with a 4-Bit
BCD code as shown below. The BCD code 1010, 1011, 1100, 1101,
1110 and 1111 are not used.
DSD UNIT I 64
Decimal BCD Conversion
• BCD is not another number system like binary, octal, decimal and
hexadecimal.
DSD UNIT I It is in fact the decimal system with each digit encoded
65
DSD UNIT I 66
Exercises
1. Convert decimal 23410 to
a. binary
b. BCD
b. octal
c. hexadecimal
Decimal Binary
Technique:
1. Start by converting the integer portion:
DSD UNIT I 69
Floating Points Conversion using Remainder Method
Decimal Binary
2. Then, convert the fraction by multiply it with the based we want to convert:
DSD UNIT I 70
Binary Decimal
Eg. 1010.012 = _________ 10
Technique:
– Multiply each binary number by 2-n, where -n is the weight of the bit for fraction starting from left to right. .
– Then, sum the results.
DSD UNIT I
1010.012 71
= 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 . 0 x 2-1 + 1 x 2-2
= 10 + 0.25
= 10.25 10
Therefore, 1010.012 = 10.2510
Base Conversion for Floating Points with the
Remainder Method
Octal – Decimal
Technique:
– Multiply each octal number by 8-n, where -n is the weight of the bit for fraction starting
from left to right. .
– Then, sum the results.
46.3
DSD UNIT I 8 = 4 x 8 1
+ 6 x 8 0
+ 3 x 8
72
-1
= 38 + 0.375
= 38.375 10
DSD UNIT I
A7.0F16 = 10 x 161 + 7 x 160 + 0 x 16-1 + 15 x 16-2
73
= 167 + 0.059
= 167.059 10
a) 11101.112 to decimal.
b) FED.4716 to octal.
c) 01101001BCD to binary.
d) 754 to BCD.
DSD UNIT I8 74
e) 152.2510 to hexadecimal.
75
Half adder and Full adder
DSD UNIT I 76
Truth tables
DSD UNIT I 77
• Definition
• Classification of Embedded Systems
• Processors in the system
• Other Hardware units
• Software components
• Examples for embedded systems
• Design issues and trends
Definition of a Embedded System.
•Security systems
•Telephone and banking
•Defense and aerospace
•Communication
Embedded Systems in Peripherals &
Computer Networking
• Digital Cameras
• Set top Boxes
• High Definition TVs
• DVDs
Embedded System Design Challenges
Software components
System Integration
Hardware Software Co-design
• Codesign
– The meeting of system-level objectives by exploiting the
trade-offs between hardware and software in a system
through their concurrent design
• Key concepts
– Concurrent: hardware and software developed at the
same time on parallel paths
– Integrated: interaction between hardware and software
developments to produce designs that meet
performance criteria and functional specifications
Motivation for Co-Design
• Factors driving codesign (hardware/software systems):
– Instruction Set Processors (ISPs) available as cores in
many design kits (DSPs, microcontrollers,etc.)
– Systems on Silicon - many transistors available in typical
processes (> 10 million transistors available in IBM ASIC
process, etc.)
– Increasing capacity of field programmable devices -
some devices even able to be reprogrammed on-the-fly
(FPGAs, CPLDs, etc.)
– Efficient C compilers for embedded processors
– Hardware synthesis capabilities
• The importance of codesign in designing hardware/software
systems:
– Improves design quality, design cycle time, and cost
• Reduces integration and test time
– Supports growing complexity of embedded systems
– Takes advantage of advances in tools and technologies
• Processor cores
• High-level hardware synthesis capabilities
• ASIC development