0% found this document useful (0 votes)
5 views

Week 3 - Ideas and Examples

The document provides examples for converting numbers between binary, decimal, and hexadecimal number systems. It includes step-by-step workings for converting different numbers between the number systems. Examples of ranges of numbers that can be represented by different numbers of bits are also provided.

Uploaded by

DOOAMADAA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Week 3 - Ideas and Examples

The document provides examples for converting numbers between binary, decimal, and hexadecimal number systems. It includes step-by-step workings for converting different numbers between the number systems. Examples of ranges of numbers that can be represented by different numbers of bits are also provided.

Uploaded by

DOOAMADAA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Attendance code: 11987688

Examples

Electrical Engineering 1

Digital Fundamentals: Examples


 We’ll go through the examples sheet
 I’ll do one, then you’ll do one
 We’ll use Point Solutions quizzes

Question 2.1 Question 2.1


 Convert the denary number 43 to binary  Convert the denary number 43 to binary
Power of 2 (2n) 27 26 25 24 23 22 21 20 Power of 2 (2n) 27 26 25 24 23 22 21 20
Power of 2 128 64 32 16 8 4 2 1 Power of 2 128 64 32 16 8 4 2 1
Digit of our number ? ? ? ? ? ? ? ? Digit of our number 0 0 1 ? ? ? ? ?

43 = 1×32 +11 43 = 1×32 +11


11 = 1×8 + 3

Question 2.1 Question 2.1


 Convert the denary number 43 to binary  Convert the denary number 43 to binary
Power of 2 (2n) 27 26 25 24 23 22 21 20 Power of 2 (2n) 27 26 25 24 23 22 21 20
Power of 2 128 64 32 16 8 4 2 1 Power of 2 128 64 32 16 8 4 2 1
Digit of our number 0 0 1 0 1 ? ? ? Digit of our number 0 0 1 0 1 0 1 ?

43 = 1×32 +11 43 = 1×32 +11


11 = 1×8 + 3 11 = 1×8 + 3
3 = 1×2 + 1 3 = 1×2 + 1
1 = 1×1
Question 2.1 Question 2.2
 Convert the denary number 43 to binary  Convert the denary (base-10) number 59 to binary
Power of 2 (2n) 27 26 25 24 23 22 21 20
Power of 2 128 64 32 16 8 4 2 1
Digit of our number 0 0 1 0 1 0 1 1
A. 111011
43 = 1×32 +11 B. 11011
11 = 1×8 + 3 C. 110111
3 = 1×2 + 1 D. 11101
1 = 1×1
43 = 1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 1×1
(43)10 = (101011)2

Question 2.3 Question 2.4


 Convert the binary number 1011 to denary  Convert the binary number 110110 to denary

(1011)2 = 1×8 + 0×4 + 1×2 + 1×1 = (11)10


A. 66
B. 54
C. 27
D. 46

Question 2.5 Question 2.6


 What range of numbers can be expressed in binary  What range of numbers can be expressed in binary
using 5 bits? using 10 bits?

There are 25 = 32 possible 5-bit numbers A. 0 to 256


The range of numbers that can be represented in 5-bit B. 0 to 255
binary is 0 to 31
C. 0 to 1024
D. 0 to 1023
Hexadecimal Hexadecimal
 Another useful number base is 16  Another useful number base is 16
Power of 16 (16n) 163 162 161 160 Power of 16 (16n) 163 162 161 160
Power of 16 4096 256 16 1 Power of 16 4096 256 16 1
Digit of our number ? ? ? ? Digit of our number 0 1 ? ?

 Example: convert (340)10 to hexadecimal  Example: convert (340)10 to hexadecimal


 340 = 1  256 + 84  340 = 1  256 + 84
 84 = 5  16 + 4

Hexadecimal Hexadecimal
 Another useful number base is 16  Another useful number base is 16
Power of 16 (16n) 163 162 161 160 Power of 16 (16n) 163 162 161 160
Power of 16 4096 256 16 1 Power of 16 4096 256 16 1
Digit of our number 0 1 5 ? Digit of our number 0 1 5 4

 Example: convert (340)10 to hexadecimal  Example: convert (340)10 to hexadecimal


 340 = 1  256 + 84  340 = 1  256 + 84
 84 = 5  16 + 4  84 = 5  16 + 4
 4=41  4=41
 (340)10 = 1  162 + 5  161 + 4  160
 = (154)16

Hexadecimal Digits Hexadecimal Example


 Hexadecimal needs 16 symbols to represent its digits
Hex digit Meaning (base 10) Binary  Convert (2D3)16 to denary Hex Denary
0 0
0 0 0000
1 1
1 1 0001 2162 + D161 + 3160 2 2
2 2 0010
2162 + 13161 + 3160 3 3
3 3 0011
4 4
4 4 0100
2256 + 1316 + 31 = (723)10 5 5
5 5 0101
6 6
6 6 0110
7 7
7 7 0111
8 8
8 8 1000
9 9
9 9 1001
A 10
A 10 1010
B 11
B 11 1011
C 12
C 12 1100
D 13
D 13 1101
E 14
E 14 1110
F 15
F 15 1111
Why Hexadecimal? Question 3.1
 Binary version of a smallish number can be very long:  Convert the binary number 1011110010100011
 Example (723)10 = (1011010011)2 to hexadecimal

 We can get a useful abbreviation of binary by noticing that a 1011 1100 1010 0011
group of 4-bits maps exactly to one hex digit
B C A 3
00 10 1101 0011

2D3

Question 3.2 Question 3.3


 Convert the binary number 11001010001  Convert the hexadecimal number 1A8 to binary
to hexadecimal and to denary

A. 03221
1 A 8
B. 156
0001 1010 1000
C. 651
D. BA1
1 × 162 + A × 161 + 8 × 160
1 × 256 + 10 × 16 + 8 × 1 = 424

Question 3.4 Question 3.4b


 Convert the hexadecimal number 2B0 to binary  Convert the hexadecimal number 2B0 to denary

A. 1010110000 A. 1236
B. 1010001000 B. 2120
C. 1000110101 C. 688
D. 1011010000 D. 256
Logic Gates Question 5.1
AND gate OR gate Inverter  Write down the Boolean equation for this circuit.
A A
A Y
C=A.B C=A+B A B=A
B B B
X
D

A B C A B C A B C Z

0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0
D = Y. Z
1 0 1
1 1 1 1 1 1 D = (A + X). Z
Outputs 1 when Outputs 1 when Output is opposite D = (A + X). (B + C)
all inputs are 1 any input is 1 of input
D = (A + B). (B + C)

Question 5.1 Question 5.1


 Fill in the truth table for this circuit.  Fill in the truth table for this circuit.
A Y A Y
B B
X X
D D

C Z C Z

A B C A B C X Y Z D
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 0
1 1 1 1 1 1

Question 5.1 Question 5.1


 Fill in the truth table for this circuit.  Fill in the truth table for this circuit.
A Y A Y
B B
X X
D D

C Z C Z

A B C X Y Z D A B C X Y Z D
0 0 0 1 0 0 0 1 1 0
0 0 1 1 0 0 1 1 1 1
0 1 0 0 0 1 0 0 0 1
0 1 1 0 0 1 1 0 0 1
1 0 0 1 1 0 0 1 1 0
1 0 1 1 1 0 1 1 1 1
1 1 0 0 1 1 0 0 1 1
1 1 1 0 1 1 1 0 1 1
Question 5.1 Question 5.2
 Fill in the truth table for this circuit.  Write down the Boolean equation for this circuit.
A Y
A Y
B
B X
D
X
D
C Z

C Z

A B C X Y Z D
0 0 0 1 1 0 0 1. D = A. B + B. C
0
0
0
1
1
0
1
0
1
0
1
1
1
0
2. D = A. B + B. C
0 1 1 0 0 1 0 3. D = A + B . (B + C)
1 0 0 1 1 0 0
1 0 1 1 1 1 1 4. D = A + B . (B + C)
1 1 0 0 1 1 1
1 1 1 0 1 1 1

Question 5.2 Question 5.3


 Which of these answers (1-4) is correct for the last  Draw the circuit for the following equation
row of truth table for this circuit?
A Y  𝑋 = 𝐴̅. 𝐵 + 𝐶. 𝐷
B
X
D

C Z A
B
Inputs 1 2 3 4 X
C
A B C D D D D
D
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 1 0 0 0 0 1
0 1 1 1 0 0 0
1 0 0 1 0 0 0
1 0 1 1 1 1 0
1 1 0 0 1 0 1
1 1 1 1 1 0 0

Attendance code: 11987688

Question 5.4
 Draw the circuit for the equation X = (A. B + C). D
A
B
1
C
D
X
Electrical Engineering 1
A
B X
2 C
D
A
B
3 X
C
D
Digital Fundamentals: Examples
A
B
4 X
C
D

You might also like