Lecture 2 - Digital Basics
Lecture 2 - Digital Basics
Overview
Digital Basic
Digital Units
Digital Design
Computer Boolean algebra Boolean equation simplification Design Process Logic gates
Digital Units
Computers Essential?
Do you have computers with you now? How many hours do you interact with a computer per day? How long can you last without computers? Knowledge of computer usage to enhance ones life Information Technology So, what is a computer?
Digital VS Analogue
Analog - continuously variable physical quantity such as spatial position or voltage Digital - information represented by discrete values (digits) of a physical quantity Example:
Which is better? FM vs AM
AM sound stored in varied amplitude FM sound stored in number of times wave change direction Both signal is susceptible to change in amplitude. So effect will be,
Before digital computer exists, analog computers is used. Data is stored in physical phenomena such as mechanical, electrical or hydraulic
Specific usage, not usable for task other than it is designed for Since the creation of transistor, computer is now reprogrammable and could be used for various types of calculations
Digital Language
Human and computer interaction Human converse in high level language while computers only understood machine language A lot of different language used to intermediate this differences also known as programming language Compiler is a program used to convert a high level language into machine language
Example
Computers are formed from combinations of massive amount off switches Switches can only recognize 0 and 1 ON or OFF Smallest form of data is bit (0 or 1) 8 bit = 1 byte Computers only understand instruction and data in binary
When do we use bit/byte? Byte Storage (Hard Disk, USB Drive 8GB) Bit Bandwidth (Broadband - 1Mbps)
Data Representation
Numbers
Decimal base 10 Binary base 2 Hexadecimal base 16
Characters
ASCII & Unicode
Decimal 1 2 9 Binary 1 10 1001 Hexadecimal 01 02 09 ASCII 0110001 0110010 0111001 Unicode U+0031 U+0032 U+0039
10
1010
0A 0110001 0110000
U+0031 U+0030
ASCII
American Standard Code for Information Interchange Used to store characters 8bit = 1 byte Permutation = 2^8 = 256 different characters
Unicode
1. 2.
3.
4.
Due to ASCII having not enough permutation of different characters What character is this? Computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems >109000 characters. Enough?
157 2 = 78 with 78 2 = 39 with 39 2 = 19 with 19 2 = 9 with 9 2 = 4 with 4 2 = 2 with 2 2 = 1 with 1 2 = 0 with a a a a a a a a remainder remainder remainder remainder remainder remainder remainder remainder of of of of of of of of 1 0 1 1 1 0 0 1
15710 = 100111012
1 x 24 = 16 Multiplying the binary 0 x 23 = 0 value with the respective 1 x 22 = 4 power of 2 in an orderly 0 x 21 = 0 manner 0 x 20 = 0
1 x 24 + 0 x 23 + 1 x 22 + 0 x 21 + 0 x 20 = 16 + 0 + 4 + 0 + 0 = 2010
Binary
Machine system
Solution is to find a number system that would be easy to convert to and from binary and number length is practical to work with.
Hexadecimal
Human-friendly representation of binary coded values 255(decimal) = 11111111(binary) = FF(hexadecimal)
= B5A
Digital Design
Computer
< 1940, computer is a profession Accepts input process data produces output
Precedence
Rules
One
variable
AND & OR
With
constant 0 or 1
De
NOT
Morgans theorem
Example of Simplification
Example 1
Example of Simplification
Example 2
Digital Design
Logic Circuit
Design a logic circuit to determine whether a person have to bring an umbrella to work.
Truth Table
Determine output from all possible combination, arrange in order to avoid error No of combination = 2^(no of input) 3 variables, thus 2^3 = 8
Input Rain (R) 0 0 0 Forecast (F) 0 0 1 Car (C) 0 1 0 Output Umbrella (U) 0 0 1
0
1 1 1 1
1
0 0 1 1
1
0 1 0 1
0
1 0 1 0
Logic Equation
Simple circuit logic equation can be obtained through observation without truth table From truth table, simplify with Boolean algebra or.... ...(extra knowledge) by using Karnaugh Map (K-Map)
Simplify..
Boolean Algebra From truth table, RFC + RFC + RFC =(RF+RF+RF)C =(RF+R(F+F))C =(RF+R(1))C =(RF+R)C =(R+R)(R+F)C =1(R+F)C =(R+F)C
K-Map
FC 00 01 11 10 R 0 0 0 0 1 1 1 0 0 1
U = RC+FC = (R+F)C
Logic Circuit
Ready for simulation and testing to ensure logic is correct and follows truth table
Input
A = Class time has ended
B = Lecture has been delivered C = Attendance has been signed
Output
X = You may leave the lecture hall
X = (A+B)CD