Number Systems and Logic Gates

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Number systems and Logic

Gates
Embedded System and Robotics MOOC
e-Yantra Team
Content

Digital System

Number System

Types of Number System

Conversion Table

Binary to Hexadecimal conversion

Basic Logic Gates


What is Digital System?

● Designed to store, process, and communicate information in digital (binary)


form
● Variety of applications (e.g., Computer)
● Computers manipulate information (text, image, audio, video) in binary form
● Binary form: 0 or 1
0

1 11 21 31 41 51 61 71 81 91

2 12 22 32 42 52 62 72 82 92

3 13 23 33 43 53 63 73 83 93

4 14 24 34 44 54 64 74 84 94

5 15 25 35 45 55 65 75 85 95

6 16 26 36 46 56 66 76 86 96

7 17 27 37 47 57 67 77 87 97

8 18 28 38 48 58 68 78 88 98

9 19 29 39 49 59 69 79 89 99

10 20 30 40 50 60 70 80 90 100
3-bit Binary 4-bit Binary 4-bit Binary

Binary Combinations 000 0000 1000

001 0001 1001

010 0010 1010

2-bit Binary 011 0011 1011

00 100 0100 1100


1-bit Binary 01 101 0101 1101
0 10 110 0110 1110
1 11 111 0111 1111
Number System

● Way of representing numbers


● Types:

Number System Base Numbers range

Decimal 10 0-9

Binary 2 0,1

Octal 8 0-7

Hexadecimal 16 0-9, A to F
Conversion table
Binary to Hexadecimal conversion
● All the registers are 8-bit (8 bit binary value)
● Consider e.g., 11110110
7 6 5 4 3 2 1 0

1 1 1 1 0 1 1 0
● Group 4-bits
● Represent using hex number

1111 0110

F 6

● Conversion result: 11110110 = 0xF6 (0x - indicates number is hex)


Contd..
● Representation in code (consider number = 15):
○ Binary: 0b00001111
○ Hex: 0x0F
○ Decimal: 15
○ Octal: 017
● 8-bit representation
Decimal 0 255

Binary 0000 0000 1111 1111

Hex 00 FF

Hex (code) 0x00 0xFF


Examples:
0110 1100
● Binary number: 01101100

Hex converted number: 0x6C

● Binary number: 11100101 1110 0101

Hex converted number: 0xE5

● Binary number: 10111 0001 0111

Hex converted number: 0x17


Logic Gates
● Basic building blocks of digital system
● Circuit with inputs (one or multiple) and output (only one)
● Generated output depends on input and logic
● Logic Gates:
○ NOT Gate
○ AND Gate
○ OR Gate
○ NAND Gate
○ NOR Gate
○ EXOR Gate
○ EXNOR Gate
NOT Gate (Inverter)

● Purpose: To perform negation on all bits


● Symbol: ~
● Logic Diagram:

● Truth Table:
Input Output

0 1

1 0
AND Gate

● Purpose: To RESET particular bit/s


● Symbol: &
● Logic Diagram:
A B Y = A.B

● Truth Table: 0 0 0

0 1 0

1 0 0

1 1 1
OR Gate

● Purpose: To SET particular bit/s


● Symbol: |
● Logic Diagram:
A B Y= A OR B

● Truth Table: 0 0 0

0 1 1

1 0 1

1 1 1
EX-OR Gate

● Purpose: To toggle particular bit/s


● Symbol: ^
● Logic Diagram:
A B Y

● Truth Table: 0 0 0

0 1 1

1 0 1

1 1 0
References

https://www.circuitcrush.com/logic-gates-basics-tutorial/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy