Flip-Flops (Cambridge (CIE) A Level Computer Science): Revision Note

Exam code: 9618

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Updated on

SR & JK flip flops

What are SR and JK flip flops?

  • In A Level Computer Science, SR (Set-Reset) and JK flip flops are digital memory components used in sequential circuits

  • They store 1 bit of data and are commonly used in counters, control systems, and synchronous logic

  • They are both types of bistable circuits, meaning:

    • They have two stable states

    • They respond to clock signals

    • They are often edge-triggered (typically on the rising edge)

SR flip flop

  • SR stands for Set and Reset

  • An SR flip-flop can be constructed using NOR gates (common in exams)

Inputs:

  • S = Set

  • R = Reset

  • CLK = Clock (when edge-triggered)

Outputs:

  • Q = Current stored value

  • NOT(Q) = Inverse of Q

SR flip flop truth table (NOR logic)

S

R

Q (next state)

Description

0

0

No change

Memory/Hold

0

1

0

Reset

1

0

1

Set

1

1

0

Forces Q = 0 (NOR only)

Examiner Tips and Tricks

  • In NOR-based SR flip-flops, S = 1, R = 1 is not invalid, it forces Q = 0

  • (In NAND-based designs, this state is undefined)

SR flip flop example

Action

S

R

Q

NOT(Q)

Reasoning

Initially

1

0

1

0

Set: S = 1 forces Q = 1

S changed to 0

0

0

1

0

Memory mode: No change

R changed to 1

0

1

0

1

Reset: R = 1 forces Q = 0

R changed to 0

0

0

0

1

Memory mode: Q holds

S and R changed to 1

1

1

0

0

NOR logic forces both Q and NOT(Q) to 0 (Q = 0)

JK flip flop

  • The JK flip-flop is a more versatile version of the SR flip-flop

  • It solves the problem of the SR’s illegal state

Problem with SR

Why JK solves it

1. S = 1 and R = 1 is invalid

JK uses this condition to toggle the output instead

2. Glitches from feedback loops

JK uses a clock to control exact timing of changes

Inputs:

  • J = Set

  • K = Reset

  • CLK = Clock (required)

Outputs:

  • Q = Current state

  • NOT(Q) = Inverse

JK flip flop truth table

J

K

Q (next)

Description

0

0

No change

Memory/Hold

0

1

0

Reset

1

0

1

Set

1

1

Toggle

Q becomes NOT(Q)

Use cases

Flip Flop

Typical uses

SR

Simple memory, control circuits

JK

Toggles, counters, frequency dividers

Worked Example

Draw a logic circuit for an SR flip-flop and label the inputs.[3]

Simple box diagram with horizontal lines on the left, vertical lines on the right labelled Q and QI. Lines on the left have no labels.

Answer

Or

SR latch circuit diagram with two NOR gates. Inputs are labelled "R/Reset" and "S/Set," with outputs marked as Q and not-Q.

You've read 0 of your 5 free revision notes this week

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science & English Subject Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.