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

XYZ F XYZ F: ENGI 3861 - Digital Logic

This document introduces digital logic concepts including: - Truth tables for logic gates like AND, OR, NAND, NOR, XOR and XNOR for 2, 3, and 4 inputs. - Converting between binary, decimal, and hexadecimal number representations. Binary numbers use base-2 while hexadecimal uses base-16. - Unsigned binary numbers are represented using n bits where the value ranges from 0 to 2n - 1. Bytes of data are often represented in hexadecimal for convenience.

Uploaded by

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

XYZ F XYZ F: ENGI 3861 - Digital Logic

This document introduces digital logic concepts including: - Truth tables for logic gates like AND, OR, NAND, NOR, XOR and XNOR for 2, 3, and 4 inputs. - Converting between binary, decimal, and hexadecimal number representations. Binary numbers use base-2 while hexadecimal uses base-16. - Unsigned binary numbers are represented using n bits where the value ranges from 0 to 2n - 1. Bytes of data are often represented in hexadecimal for convenience.

Uploaded by

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

ENGI 3861 – Digital Logic

- gates can involve more than 2 inputs

AND OR

XYZ F XYZ F
000 000
001 001
010 010
011 011
100 100
101 101
110 110
111 111

Example: What is the truth table of the following logic circuit?

XYZ F
000
001
010
011
100
101
110
111

At home, draw truth tables for 4-input AND and OR gates.

Introduction - 9
ENGI 3861 – Digital Logic

More Standard Gates

- we have already seen truth tables for 2-input AND, OR, and NOT
gates, but other gates are also of interest:

NAND

NOR

XOR

XNOR (sometimes called "Equivalence")

Introduction - 10
ENGI 3861 – Digital Logic

- some 3-input gates

NAND NOR

XYZ F XYZ F
000 000
001 001
010 010
011 011
100 100
101 101
110 110
111 111

XOR XNOR

XYZ F XYZ F
000 000
001 001
010 010
011 011
100 100
101 101
110 110
111 111

Can you determine truth tables for 4-input


NAND, NOR, XOR, XNOR ?

Introduction - 11
ENGI 3861 – Digital Logic

Unsigned Binary Numbers

- one of the most fundamental applications of digital systems is


arithmetic and numerical computations
→ How do we represent unsigned numbers for digital systems?

- we are used to numbers using base- or radix-10:

Consider number D where

Example: 372.9710 =

so digit di contributes di × 10i to the value of D

⇒ D=

- other radix can be used such as base-2:

Consider number B where

⇒ B=

Introduction - 12
ENGI 3861 – Digital Logic

Example: 1101012 =

Example: 110.0112 =

Decimal to binary?

Example: 4110 = ? in binary

Example: 0.687510 = ? in binary

Introduction - 13
ENGI 3861 – Digital Logic

Example: Try 137.87510 = ? in binary

- an n-bit (unsigned) binary number can take on 2n possible values

e.g., if x is a positive integer and is represented by n-bit


binary vector, then 0 ≤ x ≤ 2n − 1 corresponding to
binary representations 000…002 to 111…112

- other radices can be used to conveniently represent binary data

e.g., octal ≡ base 8, digits ∈ {0, 1, 2, 3, 4, 5, 6, 7}

1100102 ≡

738 ≡

e.g., hexadecimal ≡ base 16, digits ∈ {0, 1, 2, 3, 4, 5, 6, 7, 8,


9, A, B, C, D, E, F}

101110012 ≡

C716 ≡

Introduction - 14
ENGI 3861 – Digital Logic

- since, in computers, data tends to be organized in groups of


8 bits, where 8 bits is called a byte, hexadecimal is a very
convenient representation

e.g., 1CE816 ≡

byte 1 byte 2

Memorize binary to hex conversion! You will use them again and
again!

Decimal Binary Hexadecimal

0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F

Introduction - 15

You might also like