SlideShare a Scribd company logo
Chapter 0 1
Numbers & Logic
Bits & Pieces
Chapter 0 2
Base 10 example
• Decimal Number 9 7 0 1
• Place 4 3 2 1
• Place - 1 3 2 1 0
• 10(place - 1) 103 102 101 100
• ===============================
• = 9*1000 + 7*100 + 0*10 + 1*1
• = 9701
Chapter 0 3
Numeric Values
– The numeric value of a set of digits is
determined as:
• The sum of the products of each digit and its
corresponding place value,
• where the place value is the numeric-base raised to
the place - 1.
Chapter 0 4
Base 2 example
• Binary Number 0 1 0 1
• 2(place - 1) 23 22 21 20
• ===============================
• = 0*8 + 1*4 + 0*2 + 1*1
• = 5
Chapter 0 5
A general example
Base n
• Binary Number 0 1 0 1
• n(place - 1) n3 n2 n1 n0
• ===============================
• 0*(n * n* n) + 1*(n*n) + 0* n + 1*1
Chapter 0 6
Commonly Used Systems
• Binary Base 2
• Octal Base 8
• Decimal Base 10
• Hexadecimal Base 16
Chapter 0 7
Legal Digits
• What are the legal digits?
• Start at zero and stop at the base - 1
• Binary 0, 1
• Octal 0, 1, 2, 3, 4, 5, 6, 7
• Decimal 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
• Hex 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Chapter 0 8
What is the decimal value of?
• 10101 base 2
• 10101 base 8
• 10101 base 10
• 10101 base 16
Chapter 0 9
• 0000 00 00 0
• 0001 01 01 1
• 0010 02 02 2
• 0011 03 03 3
• 0100 04 04 4
• 0101 05 05 5
• 0110 06 06 6
• 0111 07 07 7
• 1000 10 08 8
• 1001 11 09 9
• 1010 12 10 A
• 1011 13 11 B
• 1100 14 12 C
• 1101 15 13 D
• 1110 16 14 E
• 1111 17 15 F
• Counting in Binary,
Octal, Decimal and
Hexadecimal
• A single Hex digit
can be used to
represent the value of
four binary digits
Chapter 0 10
Hex = Binary Shorthand
• Hexadecimals are often used as a shorthand
for large binary values.
• This shorthand is useful for specifying
memory locations, e.g.
• Decimal - 16,274,482
• Binary - 111110000101010000110010
• Hex - F85432
Chapter 0 11
Binary to Hex
• Each Hexadecimal digit represents four
binary digits
• 1111 1000 0101 0100 0011 0010
• F 8 5 4 3 2
Chapter 0 12
Binary to Octal
• Each Octal digit represents three binary
digits
• 111 110 000 101 010 000 110 010
• 7 6 0 5 2 0 6 2
Chapter 0 13
ASCII & EBCDIC
• American Standard Code for Information
Interchange
– ASCII @ Wikipedia
• Binary Coded Decimals
– Binary Coded Decimals
• Extended Binary Coded Decimals
– EBCDIC @ Wikipedia
• Unicode
– Unicode @ Wikipeda
Chapter 0 14
Binary Coded Decimals
• BCD takes advantage of the fact that any
one decimal numeral can be represented
by a four-bit pattern. The most obvious
way of encoding digits is Natural
BCD (NBCD), where each decimal digit is
represented by its corresponding four-bit
binary value, as shown in the following
table. This is also called "8421" encoding.
Chapter 0 15
Chapter 0 16
Boolean Logic
• A two valued logic often used in computers
and information systems.
• The only legal values in Boolean Logic are
– TRUE
– FALSE
Chapter 0 17
Logical Values
• Logical values can only be True or False
• Similar to numeric values, logical values
can be combined into logical expressions
using logical operators.
• The logical operators are:
not and or < <= = >= >
Chapter 0 18
Logical Expressions
• a logical-expression is any expression that
evaluates to False or True
• False
• True
• notlogical-expression
• logical-expression and logical-expression
• logical-expression or logical-expression
Chapter 0 19
Logical Expressions
are not unlike
Numerical Expressions
• A numerical-expression is any expression that
evaluates to a legal numerical value.
• Examples of numerical expressions:
– 3
– -4
– 3 + 8 / 2
– (3 + 8) / 2
Chapter 0 20
Numerical Operators
• Unary operators have only one argument
– the positive and negative signs are the unary
numerical operators.
– + -
• Binary operators require two arguments
– addition, subtraction, multiplication, division,
and exponentiation are the binary operators
– + - * / ^
Chapter 0 21
You’ve probably already used
logical expressions
• The relational operators > >= = < <=
evaluate to logical results.
• Example
– the expression 3 + 5 <= 8 - 4 evaluates to a
value of False, so it is a logical expression.
– Note that here we have combined numerical
expressions with relational operators to form a
logical expression.
Chapter 0 22
Logical Operators
• Unary operators have only one argument
– not is the only unary logical operator.
– not
• Binary operators require two arguments
– conjunction and disjunction are the binary
operators
– and or
Chapter 0 23
Truth Tables
A NOT A
F T
T F
A B A AND B
F F F
F T F
T F F
T T T
A B A OR B
F F F
F T T
T F T
T T T
Chapter 0 24
Operator Precedence
• Higher precedence evaluate first,
• Equal precedence evaluate left to right
• Parenthesis can be used to modify the order
of precedence, expressions inside
parenthesis are evaluated first.
Chapter 0 25
Operator Precedence
- (unary)
* / mod numerical operators
+ -
< = >= > <= relational operators
not
and logical operators
or
Chapter 0 26
Evaluation of Logical
Expressions
• A = True
• B = False
• Given the above evaluate the following:
• A or B => True
• A and B => False
• 3 > 7 or A => TRUE
• (3 < 7) and not A => False
Chapter 0 27
Complex Logical Expression
• A = True B = False C = True D =False
• A or not B and not (3 + 7 <= 10 / 2) or C and D
Chapter 0 28
Complex Logical Expression
• A = True B = False C = True D =False
• A or not B and not (3 + 7 <= 10 / 2) or C and D
• T or not F and not (3 + 7 <= 10 / 2) or T and F
Chapter 0 29
Complex Logical Expression
• A = True B = False C = True D =False
• A or not B and not (3 + 7 <= 10 / 2) or C and D
• T or not F and not (3 + 7 <= 10 / 2) or T and F
• T or not F and not ( 10 <= 5 ) or T and F
• T or not F and not ( F ) or T and F
Chapter 0 30
Complex Logical Expression
• A = True B = False C = True D =False
• A or not B and not (3 + 7 <= 10 / 2) or C and D
• T or not F and not ( F ) or T and F
• T or T and T or T and F
Chapter 0 31
Complex Logical Expression
• A = True B = False C = True D =False
• A or not B and not (3 + 7 <= 10 / 2) or C and D
• T or T and T or T and F
• T or T or F
Chapter 0 32
Complex Logical Expression
• A = True B = False C = True D =False
• A or not B and not (3 + 7 <= 10 / 2) or C and D
• T or T or F
• T or F
• T
Chapter 0 33
Normal Forms
• Conjunctive Normal Form
– A and B and C and D and E
– any false value makes the expression false
• Disjunctive Normal Form
– A or B or C or D or E
– any true value makes the expression true
Chapter 0 34
Computer Time
• millisecond 10-3 = 1/1,000
• microsecond 10-6 = 1/1,000,000
• nanosecond 10-9 = 1/1,000,000,000
• picosecond 10-12 = 1/1,000,000,000,000
• femtosecond 10-15 = 1/1,000,000,000,000,000
• Conversion of Time Units
Chapter 0 35
Computer Units
• Thousand 103 = 1,000
• Kilobyte 210 = 1,024
• Million 106 = 1,000,000
• Megabyte 220 = 1,048,576
• Billion 109 = 1,000,000,000
• Gigabyte 230 = 1,073,741,824
• Trillion 1012 = 1,000,000,000,000
• Terabyte 240 = 1,099,511,627,776
Chapter 0 36
Bigger Units
• Trillion 1012 = 1,000,000,000,000
• Terabyte 240 = 1,099,511,627,776
• Quadrillion 1015 = 1,000,000,000,000,000
• Petabyte 250 = 1,125,899,906,842,624
• Quintillion 1018 = 1,000,000,000,000,000,000
• Exabyte 260 = 1,152,921,504,606,846,976
• Sextillion 1021 = 1,000,000,000,000,000,000,000
• Zettabyte 270 = 1,180,591,620,717,411,303,424
• Septillion 1024 = 1,000,000,000,000,000,000,000,000
• Yottabyte 280 = 1,208,925,819,614,629,174,706,176
• Byte Converter – File Size Calculator
• Million, Billion, Trillion
Quiz # 01
• Convert the following Number
• (1100110)2 = ()16
• (A7)16 = ()10
• (88)10 = ()2
• (55)8 = ()2
• (62)8 = ()10
Chapter 0 37

More Related Content

Similar to Week - 01, 02, 03 Bits-n-Pieces Chapter 1.ppt

LCDF3_Chap_01x.pptx
LCDF3_Chap_01x.pptxLCDF3_Chap_01x.pptx
LCDF3_Chap_01x.pptx
DaniyalMunir1
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
MdJubayerFaisalEmon
 
Chapter02.pdf
Chapter02.pdfChapter02.pdf
Chapter02.pdf
kndnewguade
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
nivedita murugan
 
Okkkkk
OkkkkkOkkkkk
Unit 1 PDF.pptx
Unit 1 PDF.pptxUnit 1 PDF.pptx
Unit 1 PDF.pptx
ChandraV13
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
Janki Shah
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
 
Number system
Number systemNumber system
Number system
Mohit Saini
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
MamataAnilgod
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
MariaJoseph591921
 
Module 2_Data representations.pdf
Module 2_Data representations.pdfModule 2_Data representations.pdf
Module 2_Data representations.pdf
Aditya kishore saxena
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
skatiarrahaman
 
data representation
 data representation data representation
data representation
Haroon_007
 
Only floating point lecture 7 (1)
Only floating point lecture 7 (1)Only floating point lecture 7 (1)
Only floating point lecture 7 (1)
talhashahid40
 
1. basic theories of information
1. basic theories of information1. basic theories of information
1. basic theories of information
'Cedrick SuperGreenilistic Expialidocious Antonino
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
AliaaTarek5
 
03_NumberSystems.pdf
03_NumberSystems.pdf03_NumberSystems.pdf
03_NumberSystems.pdf
vijayapraba1
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number system
ISMT College
 

Similar to Week - 01, 02, 03 Bits-n-Pieces Chapter 1.ppt (20)

LCDF3_Chap_01x.pptx
LCDF3_Chap_01x.pptxLCDF3_Chap_01x.pptx
LCDF3_Chap_01x.pptx
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
 
Chapter02.pdf
Chapter02.pdfChapter02.pdf
Chapter02.pdf
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Unit 1 PDF.pptx
Unit 1 PDF.pptxUnit 1 PDF.pptx
Unit 1 PDF.pptx
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
Number system
Number systemNumber system
Number system
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
 
Module 2_Data representations.pdf
Module 2_Data representations.pdfModule 2_Data representations.pdf
Module 2_Data representations.pdf
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
data representation
 data representation data representation
data representation
 
Only floating point lecture 7 (1)
Only floating point lecture 7 (1)Only floating point lecture 7 (1)
Only floating point lecture 7 (1)
 
1. basic theories of information
1. basic theories of information1. basic theories of information
1. basic theories of information
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
 
03_NumberSystems.pdf
03_NumberSystems.pdf03_NumberSystems.pdf
03_NumberSystems.pdf
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number system
 

More from TALHA RIAZ PERSOTA

Week - 06, 07, 08 DataMgt Chapter 3.pptx
Week - 06, 07, 08 DataMgt Chapter 3.pptxWeek - 06, 07, 08 DataMgt Chapter 3.pptx
Week - 06, 07, 08 DataMgt Chapter 3.pptx
TALHA RIAZ PERSOTA
 
Week - 04, 05 Software Chapter 2 info sys.ppt
Week - 04, 05 Software Chapter 2 info sys.pptWeek - 04, 05 Software Chapter 2 info sys.ppt
Week - 04, 05 Software Chapter 2 info sys.ppt
TALHA RIAZ PERSOTA
 
ch01_02.ppt
ch01_02.pptch01_02.ppt
ch01_02.ppt
TALHA RIAZ PERSOTA
 
Lab # 05 Workshop Practice.pptx
Lab # 05 Workshop Practice.pptxLab # 05 Workshop Practice.pptx
Lab # 05 Workshop Practice.pptx
TALHA RIAZ PERSOTA
 
Lab # 03 Workshop Practice.pptx
Lab # 03 Workshop Practice.pptxLab # 03 Workshop Practice.pptx
Lab # 03 Workshop Practice.pptx
TALHA RIAZ PERSOTA
 
Lab # 02 Workshop Practice.pptx
Lab # 02 Workshop Practice.pptxLab # 02 Workshop Practice.pptx
Lab # 02 Workshop Practice.pptx
TALHA RIAZ PERSOTA
 
Lab # 01 Workshop Practice.pptx
Lab # 01 Workshop Practice.pptxLab # 01 Workshop Practice.pptx
Lab # 01 Workshop Practice.pptx
TALHA RIAZ PERSOTA
 

More from TALHA RIAZ PERSOTA (7)

Week - 06, 07, 08 DataMgt Chapter 3.pptx
Week - 06, 07, 08 DataMgt Chapter 3.pptxWeek - 06, 07, 08 DataMgt Chapter 3.pptx
Week - 06, 07, 08 DataMgt Chapter 3.pptx
 
Week - 04, 05 Software Chapter 2 info sys.ppt
Week - 04, 05 Software Chapter 2 info sys.pptWeek - 04, 05 Software Chapter 2 info sys.ppt
Week - 04, 05 Software Chapter 2 info sys.ppt
 
ch01_02.ppt
ch01_02.pptch01_02.ppt
ch01_02.ppt
 
Lab # 05 Workshop Practice.pptx
Lab # 05 Workshop Practice.pptxLab # 05 Workshop Practice.pptx
Lab # 05 Workshop Practice.pptx
 
Lab # 03 Workshop Practice.pptx
Lab # 03 Workshop Practice.pptxLab # 03 Workshop Practice.pptx
Lab # 03 Workshop Practice.pptx
 
Lab # 02 Workshop Practice.pptx
Lab # 02 Workshop Practice.pptxLab # 02 Workshop Practice.pptx
Lab # 02 Workshop Practice.pptx
 
Lab # 01 Workshop Practice.pptx
Lab # 01 Workshop Practice.pptxLab # 01 Workshop Practice.pptx
Lab # 01 Workshop Practice.pptx
 

Recently uploaded

ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 

Recently uploaded (20)

ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 

Week - 01, 02, 03 Bits-n-Pieces Chapter 1.ppt

  • 1. Chapter 0 1 Numbers & Logic Bits & Pieces
  • 2. Chapter 0 2 Base 10 example • Decimal Number 9 7 0 1 • Place 4 3 2 1 • Place - 1 3 2 1 0 • 10(place - 1) 103 102 101 100 • =============================== • = 9*1000 + 7*100 + 0*10 + 1*1 • = 9701
  • 3. Chapter 0 3 Numeric Values – The numeric value of a set of digits is determined as: • The sum of the products of each digit and its corresponding place value, • where the place value is the numeric-base raised to the place - 1.
  • 4. Chapter 0 4 Base 2 example • Binary Number 0 1 0 1 • 2(place - 1) 23 22 21 20 • =============================== • = 0*8 + 1*4 + 0*2 + 1*1 • = 5
  • 5. Chapter 0 5 A general example Base n • Binary Number 0 1 0 1 • n(place - 1) n3 n2 n1 n0 • =============================== • 0*(n * n* n) + 1*(n*n) + 0* n + 1*1
  • 6. Chapter 0 6 Commonly Used Systems • Binary Base 2 • Octal Base 8 • Decimal Base 10 • Hexadecimal Base 16
  • 7. Chapter 0 7 Legal Digits • What are the legal digits? • Start at zero and stop at the base - 1 • Binary 0, 1 • Octal 0, 1, 2, 3, 4, 5, 6, 7 • Decimal 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 • Hex 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
  • 8. Chapter 0 8 What is the decimal value of? • 10101 base 2 • 10101 base 8 • 10101 base 10 • 10101 base 16
  • 9. Chapter 0 9 • 0000 00 00 0 • 0001 01 01 1 • 0010 02 02 2 • 0011 03 03 3 • 0100 04 04 4 • 0101 05 05 5 • 0110 06 06 6 • 0111 07 07 7 • 1000 10 08 8 • 1001 11 09 9 • 1010 12 10 A • 1011 13 11 B • 1100 14 12 C • 1101 15 13 D • 1110 16 14 E • 1111 17 15 F • Counting in Binary, Octal, Decimal and Hexadecimal • A single Hex digit can be used to represent the value of four binary digits
  • 10. Chapter 0 10 Hex = Binary Shorthand • Hexadecimals are often used as a shorthand for large binary values. • This shorthand is useful for specifying memory locations, e.g. • Decimal - 16,274,482 • Binary - 111110000101010000110010 • Hex - F85432
  • 11. Chapter 0 11 Binary to Hex • Each Hexadecimal digit represents four binary digits • 1111 1000 0101 0100 0011 0010 • F 8 5 4 3 2
  • 12. Chapter 0 12 Binary to Octal • Each Octal digit represents three binary digits • 111 110 000 101 010 000 110 010 • 7 6 0 5 2 0 6 2
  • 13. Chapter 0 13 ASCII & EBCDIC • American Standard Code for Information Interchange – ASCII @ Wikipedia • Binary Coded Decimals – Binary Coded Decimals • Extended Binary Coded Decimals – EBCDIC @ Wikipedia • Unicode – Unicode @ Wikipeda
  • 15. Binary Coded Decimals • BCD takes advantage of the fact that any one decimal numeral can be represented by a four-bit pattern. The most obvious way of encoding digits is Natural BCD (NBCD), where each decimal digit is represented by its corresponding four-bit binary value, as shown in the following table. This is also called "8421" encoding. Chapter 0 15
  • 16. Chapter 0 16 Boolean Logic • A two valued logic often used in computers and information systems. • The only legal values in Boolean Logic are – TRUE – FALSE
  • 17. Chapter 0 17 Logical Values • Logical values can only be True or False • Similar to numeric values, logical values can be combined into logical expressions using logical operators. • The logical operators are: not and or < <= = >= >
  • 18. Chapter 0 18 Logical Expressions • a logical-expression is any expression that evaluates to False or True • False • True • notlogical-expression • logical-expression and logical-expression • logical-expression or logical-expression
  • 19. Chapter 0 19 Logical Expressions are not unlike Numerical Expressions • A numerical-expression is any expression that evaluates to a legal numerical value. • Examples of numerical expressions: – 3 – -4 – 3 + 8 / 2 – (3 + 8) / 2
  • 20. Chapter 0 20 Numerical Operators • Unary operators have only one argument – the positive and negative signs are the unary numerical operators. – + - • Binary operators require two arguments – addition, subtraction, multiplication, division, and exponentiation are the binary operators – + - * / ^
  • 21. Chapter 0 21 You’ve probably already used logical expressions • The relational operators > >= = < <= evaluate to logical results. • Example – the expression 3 + 5 <= 8 - 4 evaluates to a value of False, so it is a logical expression. – Note that here we have combined numerical expressions with relational operators to form a logical expression.
  • 22. Chapter 0 22 Logical Operators • Unary operators have only one argument – not is the only unary logical operator. – not • Binary operators require two arguments – conjunction and disjunction are the binary operators – and or
  • 23. Chapter 0 23 Truth Tables A NOT A F T T F A B A AND B F F F F T F T F F T T T A B A OR B F F F F T T T F T T T T
  • 24. Chapter 0 24 Operator Precedence • Higher precedence evaluate first, • Equal precedence evaluate left to right • Parenthesis can be used to modify the order of precedence, expressions inside parenthesis are evaluated first.
  • 25. Chapter 0 25 Operator Precedence - (unary) * / mod numerical operators + - < = >= > <= relational operators not and logical operators or
  • 26. Chapter 0 26 Evaluation of Logical Expressions • A = True • B = False • Given the above evaluate the following: • A or B => True • A and B => False • 3 > 7 or A => TRUE • (3 < 7) and not A => False
  • 27. Chapter 0 27 Complex Logical Expression • A = True B = False C = True D =False • A or not B and not (3 + 7 <= 10 / 2) or C and D
  • 28. Chapter 0 28 Complex Logical Expression • A = True B = False C = True D =False • A or not B and not (3 + 7 <= 10 / 2) or C and D • T or not F and not (3 + 7 <= 10 / 2) or T and F
  • 29. Chapter 0 29 Complex Logical Expression • A = True B = False C = True D =False • A or not B and not (3 + 7 <= 10 / 2) or C and D • T or not F and not (3 + 7 <= 10 / 2) or T and F • T or not F and not ( 10 <= 5 ) or T and F • T or not F and not ( F ) or T and F
  • 30. Chapter 0 30 Complex Logical Expression • A = True B = False C = True D =False • A or not B and not (3 + 7 <= 10 / 2) or C and D • T or not F and not ( F ) or T and F • T or T and T or T and F
  • 31. Chapter 0 31 Complex Logical Expression • A = True B = False C = True D =False • A or not B and not (3 + 7 <= 10 / 2) or C and D • T or T and T or T and F • T or T or F
  • 32. Chapter 0 32 Complex Logical Expression • A = True B = False C = True D =False • A or not B and not (3 + 7 <= 10 / 2) or C and D • T or T or F • T or F • T
  • 33. Chapter 0 33 Normal Forms • Conjunctive Normal Form – A and B and C and D and E – any false value makes the expression false • Disjunctive Normal Form – A or B or C or D or E – any true value makes the expression true
  • 34. Chapter 0 34 Computer Time • millisecond 10-3 = 1/1,000 • microsecond 10-6 = 1/1,000,000 • nanosecond 10-9 = 1/1,000,000,000 • picosecond 10-12 = 1/1,000,000,000,000 • femtosecond 10-15 = 1/1,000,000,000,000,000 • Conversion of Time Units
  • 35. Chapter 0 35 Computer Units • Thousand 103 = 1,000 • Kilobyte 210 = 1,024 • Million 106 = 1,000,000 • Megabyte 220 = 1,048,576 • Billion 109 = 1,000,000,000 • Gigabyte 230 = 1,073,741,824 • Trillion 1012 = 1,000,000,000,000 • Terabyte 240 = 1,099,511,627,776
  • 36. Chapter 0 36 Bigger Units • Trillion 1012 = 1,000,000,000,000 • Terabyte 240 = 1,099,511,627,776 • Quadrillion 1015 = 1,000,000,000,000,000 • Petabyte 250 = 1,125,899,906,842,624 • Quintillion 1018 = 1,000,000,000,000,000,000 • Exabyte 260 = 1,152,921,504,606,846,976 • Sextillion 1021 = 1,000,000,000,000,000,000,000 • Zettabyte 270 = 1,180,591,620,717,411,303,424 • Septillion 1024 = 1,000,000,000,000,000,000,000,000 • Yottabyte 280 = 1,208,925,819,614,629,174,706,176 • Byte Converter – File Size Calculator • Million, Billion, Trillion
  • 37. Quiz # 01 • Convert the following Number • (1100110)2 = ()16 • (A7)16 = ()10 • (88)10 = ()2 • (55)8 = ()2 • (62)8 = ()10 Chapter 0 37