Two Choices
Why computers use binary
Why binary?
Electronic computers use electricity to
represent real information.
This is similar to an electric light switch.
When the switch is in the “on”
position, the light will be on.
When it is the “off” position, the light
will be off.
On a computer we can store this
information as a single number.
1 would mean that the light is on.
0 would mean that the light is off.
14/11/2013

2
Bits, Nibbles and Bytes
Computers store millions of pieces of binary
information – we need a way of grouping them
together!
A single binary digit
is called a “bit”.
This stands for

binary digit.
14/11/2013

3
Units
The smallest unit in binary is the bit.
Four bits together are called one nibble.
Eight bits are called one byte.
1024 bytes are called one kilobyte (kb)
1024 kilobytes are called one megabyte (mb)
1024 megabytes are called one gigabyte (gb)
1024 gigabytes are called one terabyte (tb)

14/11/2013

4
How many values
One bit can store two values (0 and 1)
How many different ways can we arrange two
bits in?

00

01

10

11

Two bits give four different values
14/11/2013

5
Nibbles
Four bits together (half a byte), is called a nibble
On your worksheet (Activity 1), write all the
different values that we can store in one nibble.
Warning – Maths ahead!
1 bit can store 21 values (2 different value)
2 bits can store 22 values (4 different values)
3 bits can store 23 values (8 different values)
4 bits can store 24 values (16 different values)
How many values in 5 bits?
14/11/2013

6
One nibble
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
14/11/2013

There are 16 different values that can be
stored in one nibble
Can you see a pattern?

7
One nibble
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
14/11/2013

In the right column, the zero and one swap
every time

8
One nibble
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
14/11/2013

In the second column, the zero and one are
on for two values, then off for two values.

9
One nibble
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
14/11/2013

In the third column, the ones and zeros are
on for four values, then off for four values.

10
One nibble
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
14/11/2013

In the fourth column, the ones are on for
eight values and off for eight values.

11
Convert them to “denary”
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
14/11/2013

Zero
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

(1 x 1)
(1 x 2 + 0 x 1)
(1 x 2 + 1 x 1)
(1 x 4 + 0 x 2 + 0 x 1)
(1 x 4 + 0 x 2 + 1 x 1)
(1 x 4 + 1 x 2 + 0 x 1)
(1 x 4 + 1 x 2 + 1 x 1)
(1 x 8 + 0 x 4 + 0 x 2 + 0 x 1)
(1 x 8 + 0 x 4 + 0 x 2 + 1 x 1)
(1 x 8 + 0 x 4 + 1 x 2 + 0 x 1)
(1 x 8 + 0 x 4 + 1 x 2 + 1 x 1)
(1 x 8 + 1 x 4 + 0 x 2 + 0 x 1)
(1 x 8 + 1 x 4 + 0 x 2 + 1 x 1)
(1 x 8 + 1 x 4 + 1 x 2 + 0 x 1)
(1 x 8 + 1 x 4 + 1 x 2 + 1 x 1)
12
Activity sheet

Please do activities two and
three on the sheet

14/11/2013

13
Binary addition
+

0
1
1

0
0
0

1
0
1

0
1
0
1

1
1
0
0

1
1
0

0
1
1

1
0
1

1 + 0 + 1001011011=inin binary. We write
1 + 1 is is 2 which is 1045 denary write
2 + 0 + 1is 10so we write
0 which is
binary. We
0 1 1 0 is 1 we can write that answer below
1 + 0 is 1 soso we write 1 in the box below
0+1 0
0
0 inin the1 in the boxand carry 1
0 the box below and carry denary
box below below
10000110 = 134 1

10110011 = 179 denary

14/11/2013

14
Activity 4

Some examples of binary
addition are in activity 4

14/11/2013

15
Binary Logic
As well as adding binary numbers we can
also use “Binary Logic”
The three “operations” that we need to
know are

AND
OR
NOT
14/11/2013

16
AND
The rule that we apply with “AND” is
that both bits need to be a 1 to give the
answer of 1
0
1
0
1
14/11/2013

AND

=

AND

0
0
1

=

0
0
0

AND

1

=

1

AND

=

17
OR
The rule that we apply with “OR” is that
either bit can be a 1 to give the answer
of 1
=
0 OR 0
0
=
1 OR 0
1
=
0 OR 1
1
1
14/11/2013

OR

1

=

1
18
NOT
NOT simply reverses the zero and ones
NOT
NOT

0
1

=
=

1
0

Now complete Activity 5
14/11/2013

19
Nightclub Activity 6
Come and visit Yorkshire’s number one nightclub

Mondays only
No Alcohol night, so you
don’t need proof of age,
and no dress code!

14/11/2013

20
AND and OR in computers
So how does this binary help a computer?
We can use bits to store whether a
customer has met the requirements.
VIP

Monday

Proof of
Age

No Denim

No
Trainers

1

1

1

1

1

If either of these are 1
= Allowed in (OR)
14/11/2013

All of these have to be 1
= Allowed in (AND)
21
Truth Tables
In your exam, you may be asked to
complete a “truth table”
For example, what is the truth table for
P = A AND B
Page 39 in text book

14/11/2013

22
Logic Symbols
A

Has two inputs

C

B

And one output

A
0

C
0

0

1

0

1

0

0

1

14/11/2013

B
0

1

1

23
Logic Symbols
A

Has two inputs

C

B

And one output

A
0

C
0

0

1

1

1

0

1

1

14/11/2013

B
0

1

1

24
Logic Symbols
Activity 7 – just first three questions
Activity 7 – questions four, five, six
Now the tricky ones – try the rest

14/11/2013

25

More Related Content

PPTX
Bits and the organization of memory
PPT
Computer Systems Data Representation
PPTX
What is binary and why do we use it?
KEY
Binary number
PPTX
Mrs. Noland's Binary System ppt
PPTX
Semiconductor Memories
PPTX
Semiconductor memories
PPT
Semiconductor memory
Bits and the organization of memory
Computer Systems Data Representation
What is binary and why do we use it?
Binary number
Mrs. Noland's Binary System ppt
Semiconductor Memories
Semiconductor memories
Semiconductor memory

Similar to Binary Logic (20)

PPTX
MODULE-1(b) - Machine-Instructions-and-Programs.pptx
PPTX
MODULE-1(b) - Machine-Instructions-and-Programs.pptx
PPTX
MODULE-1(b) - Machine-Instructions-and-Programs.pptx
PPTX
Number systems - binary, BCD, 2s comp
PPTX
Computer Arithmetic(add,sub,multiply,div).pptx
PPTX
Unit 1 - Information Representation Presentation.pptx
DOC
Dpsd lecture-notes
PPTX
09 binary number systems
PPT
fundamentals.ppt
PPT
fundamentals.ppt
PPT
5941981.ppt
PPTX
Introduction to Computing
PDF
Course Intro CPSC125
PPSX
Binary arithmetic and algebra basics.ppsx
PPT
Arithmatic &Logic Unit
PPT
intro_Bit_Data_Type_and_opreationon_in computer.ppt
PPT
Chapter 02 Data Types
PPTX
binary arithmetic conversion.pptx
PDF
Bits, Bytes and Blobs
MODULE-1(b) - Machine-Instructions-and-Programs.pptx
MODULE-1(b) - Machine-Instructions-and-Programs.pptx
MODULE-1(b) - Machine-Instructions-and-Programs.pptx
Number systems - binary, BCD, 2s comp
Computer Arithmetic(add,sub,multiply,div).pptx
Unit 1 - Information Representation Presentation.pptx
Dpsd lecture-notes
09 binary number systems
fundamentals.ppt
fundamentals.ppt
5941981.ppt
Introduction to Computing
Course Intro CPSC125
Binary arithmetic and algebra basics.ppsx
Arithmatic &Logic Unit
intro_Bit_Data_Type_and_opreationon_in computer.ppt
Chapter 02 Data Types
binary arithmetic conversion.pptx
Bits, Bytes and Blobs
Ad

Recently uploaded (20)

PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
PPTX
Computer Architecture Input Output Memory.pptx
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Journal of Dental Science - UDMY (2021).pdf
PPTX
Module on health assessment of CHN. pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
HVAC Specification 2024 according to central public works department
PPTX
What’s under the hood: Parsing standardized learning content for AI
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
My India Quiz Book_20210205121199924.pdf
PPTX
Education and Perspectives of Education.pptx
PDF
semiconductor packaging in vlsi design fab
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
Computer Architecture Input Output Memory.pptx
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Journal of Dental Science - UDMY (2021).pdf
Module on health assessment of CHN. pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
HVAC Specification 2024 according to central public works department
What’s under the hood: Parsing standardized learning content for AI
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
Environmental Education MCQ BD2EE - Share Source.pdf
Introduction to pro and eukaryotes and differences.pptx
My India Quiz Book_20210205121199924.pdf
Education and Perspectives of Education.pptx
semiconductor packaging in vlsi design fab
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Unit 4 Computer Architecture Multicore Processor.pptx
Ad

Binary Logic