More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
page
Python IDE Dashboard

Logic Gates Challenges

For this set of challenges, your task is to design logic gates circuits in order to produce the desired output for the given inputs as described in each challenge. You can combine as many logic gates as necessary using the standard logic gates (NOT, AND, OR, XOR, etc.)

Challenge #1Challenge #2Challenge #3Challenge #4Challenge #5

Challenge #1

The light bulb should only be on when either:

  • Both inputs A and B are on while input C is off

or:

  • Both inputs A and B are off while input C is on

Click on this picture to create a logic gates circuit to solve this challenge

Challenge #2

The light bulb should be one when only one of the inputs is on while the remaining two inputs are off.

Click on this picture to create a logic gates circuit to solve this challenge

Challenge #3

The light bulb should be one when any two of the inputs are on while the remaining input is off.

Click on this picture to create a logic gates circuit to solve this challenge

Challenge #4

  • When input A is on, the light bulb should be controlled by turning switch B on and off.
  • When input A is off, the light bulb should be controlled by turning switch C on and off.

Click on this picture to create a logic gates circuit to solve this challenge

Challenge #5

This challenge will require 4 inputs: A, B, C and D.
The light bulb should only be on when either:

  • Both inputs A and D are on while B and C are off

or:

  • Both inputs A and D are off while B and C are on

Click on this picture to create a logic gates circuit to solve this challenge

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with:

Digital Padlock using Logic Gates

In this post we are going to use logic gates and D-Type Flip-Flop circuits to create a 3-bit digital padlock with a stored combination that can be reset.

Let’s first investigate how we are going to store the 3-bit combination in our circuit using 3 D-Type Flip-Flop circuits.

D-Type Flip-Flop Circuits


A D-Type Flip-Flop circuit is a circuit used to create a memory cell to store 1 bit of information (0 or 1). It is built using four NAND logic gates connected as follows:
D-Type-Flip-Flop-Logic-Gates

We represent a D-Type Flip-Flop Circuit as follows. You can change the input values D and E by clicking on the corresponding buttons below to see the impact on the outputs Q and Q.




D-Type-Flip-Flop-Circuit




You can also test the behaviour of a D-Type flip-flop circuit using our online simulator:
Click on the above circuit to open in a new window.

A D-Type Flip-Flop Circuit is used to store 1 bit of information. It has two input pins (Called D (Data) and E (Enabler) and two output pins (Q and Q = NOT Q).

The truth table of a D-Type Flip-Flop circuit is as follows:
D-Type-Flip-Flop-Truth-Table

When the enabler input E is set to 1, the output Q can be set to the Data input D.
When the enabler input E is set to 0, the output Q cannot be changed. It remains as its previous value. In other word it retains its value. This is why this circuit is used to create memory cells (e.g in the RAM).

Random Access Memory (RAM) consists of billions of data cells, each data-cell uses a D-Type flip-flop circuit.

Random Access Memory (RAM) consists of billions of data cells, each data-cell uses a D-Type flip-flop circuit.

Digital Padlock

To create our padlock we will need a circuit to input a 3-bit combination and store it using 3 memory cells (D-Type Flip-Flop circuits).

We will then use another set of 3 inputs to let the user try to unlock the padlock by trying different combinations. You can click on the circuit below to access our full 3-bit digital padlock.

You will notice on this circuit that the 3 XNOR gates are used to compare each digit (user guess with combination). If both digits are the same (both set to 0 or both set to 1) the XNOR gate output is on. The AND gates are then used to check if all 3 digits have been guessed right. In this case the lightbulb will turn on, indicating that the user has found the correct combination/key.

To use this circuit you will need to complete the following 5 steps:

  1. Input a combination (e.g. 101) using the top 3 switches set to “On-Off-On”.
  2. Turn the enabler (Reset button) to “on” to store this combination into the memory cells.
  3. Turn the enabler (Reset button) to “off” to lock the combination.
  4. Hide the combination by turning all top 3 switches to “off”.
  5. Use the bottom 3 switches to try to guess the right combination. The bulb should only be on when the right combination is inputted (e.g. 101).

Your task

First you will need to test the above circuit with different combinations to see if it works. Then your task is to complete this circuit by adding an extra digit to the key and turn this padlock into a 4-bit padlock.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with:

Design your own Logic Gates Circuits

In this blog post your will use our logic gates circuits simulator to create and test your own circuits.

Circuit #1

Our first circuit will be based on the following Boolean Expression:

Click on the above circuit to open it in our Logic Gates Circuits simulator.

This is now your turn to recreate some logic gates circuits using the following Boolean expressions.

Circuit #2

Use the logic gates circuits simulator to create and test a circuit based on the following Boolean expression:

Circuit #3

Use the logic gates circuits simulator to create and test a circuit based on the following Boolean expression:

Circuit #4

Use the logic gates circuits simulator to create and test a circuit based on the following Boolean expression:

Circuit #5

Use the logic gates circuits simulator to create and test a circuit based on the following Boolean expression:

Circuit #6

Use the logic gates circuits simulator to create and test a circuit based on the following Boolean expression:

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with:

GCSE Computer Science Revision

Getting ready for your GCSE Computer Science exams? Test our knowledge by answering all the following questions:
GCSE Computer Science RevisionOpen in New Window

Daily Protocolometer

In this post, we are investigating our daily use of the main protocols used when accessing the Internet while using our smartphone, laptop or desktop computer, tablet, smartTV or game console.

Protocols are an essential concept to enable network communications and data transfer between different devices. A protocol defines the rules to be followed by both devices to be able to communicate with one another.

On the Internet, most communications use the TCP/IP range of protocols which relies on packet switching and the use of IP addresses to uniquely identify devices on the network.

Protocols can also be grouped into layers: The TCP Stack consists of 4 key layers:

  • The application layer which regroups the following protocols: HTTP, HTTPS, FTP, SMTP, POP3, IMAP, etc.
  • The transport layer which consists mainly of the TCP and UDP protocols
  • The internet layer which consists mainly of the IP Protocols (e.g. IPv4, IPv6)
  • The link layer (a.k.a. physical layer) which regroups various protocols used to transfer data over a cable (e.g. Ethernet protocol) or wirelessly (e.g. WiFi, 3G/4G/5G) protocols.

Your Task

Answer the following 10 questions to evaluate your daily use of networking protocols:

Daily ProtocolometerOpen in New Window

Hair & Beauty Salon – Entity Relationship Diagram (ERD)

“Stylish” is a Hair & Beauty Salon offering a wide range of hair & beauty treatments to customers. They currently employ five hair stylists and three beauticians. They currently use a notebook to record all their information such as customer contact details, appointments, treatments to be performed and payments.

They would like a new IT system to optimise their booking systems and keep track of payments so that they can renumerate their employees accordingly based on the treatments they completed.

They would like the new system to allow staff to:

  • Record customers’ contact details, so that existing customers do not have to provide their details every time they book an appointment.
  • Record dates and times of appointments and for each appointment, record the list of services/treatments being booked and for each treatment record the name of the employee who will be performing the treatment.
  • Calculate and store the total cost of the treatments booked and store this information with the appointment details alongside a status field to indicate whether the appointment has been paid or not.

Your task is to review the requirements of this Hair & Beauty Salon in order to design the Entity Relationship Diagram (ERD) for this system.

For more information about relational databases and Entity Relationship Diagrams, visit the following pages:

Use our online ERD tool to design the Entity Relationship Diagram for this salon. Note that you have not been given all pieces of information to store about the employees, customers, appointments, bookings, treatments and payments so you will have to decide of the most relevant fields to include on your ERD.

Design Your ERD Online
unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Creating Logic Gates using Transistors

As you know, computers can only process binary data which consists of 0’s and 1’s. This is due to the fact that the main processing components (e.g. the CPU) are made of transistors: tiny electronic switches that can be turned on (1) and off (0).

A transistor is an electronic component with three pins. Basically, a transistor is a switch (between two of the pins: the collector and the emitter) that is operated by having a small current in the third pin called the base.

Use the checkboxes below this transistor to understand how applying a voltage to the base of a transistor is equivalent to turning on a switch.

transistor-00

Apply voltage to: Base   –    Collector

A transistor acts as a switch, operated by applying a current to the base.

A transistor acts like a switch, operated by applying a small current to the base.

Transistors come in many shapes and sizes

Transistors come in many shapes and sizes. Inside the CPU fully integrated nano-transistors are just a few atoms wide!

Using a small breadboard circuit, we can test the behaviour of a transistor. You can reproduce the following circuit see how the transistor operates.

Logic Gates

A logic gate is a small electronic circuit made of one or two transistors and used to process binary data. Logic gates such as the AND gate, OR Gate, NOT Gate, XOR gate and NAND gates are the key building blocks of any computer system.

In this challenge, you will recreate some of theses logic gates by combining several transistors together. You will then test your logic gates to record their behaviour using a truth table, that will show all the outputs of your logic gates for all possible input combinations.

Use the tabs below to see how some of the key logic gates are built using transistors:

AND GateOR GATENOT GATENAND GATE
transistor-AND-Gate
Now let’s recreate this circuit a breadboard and a few electronic components:

Truth Table:

Input A Input B Output X
0 0
0 1
1 0
1 1
transistor-OR-Gate
Now let’s recreate this circuit a breadboard and a few electronic components:

Truth Table:

Input A Input B Output X
0 0
0 1
1 0
1 1
transistor-NOT-Gate
Now let’s recreate this circuit a breadboard and a few electronic components:

Truth Table:

Input A Output X
0
1
transistor-NAND-Gate
Now let’s recreate this circuit a breadboard and a few electronic components:

Truth Table:

Input A Input B Output X
0 0
0 1
1 0
1 1

Integrated Circuits?


An integrated circuit (also referred to as a chip, or a microchip) is a set of electronic circuits on one small flat piece (or “chip”) of semiconductor material, normally silicon. The integration of large numbers of tiny transistors into a small chip results in circuits that are smaller, cheaper, and faster than those constructed of discrete electronic components.

Integrated Circuit 7408: Quad 2-input AND gate

Integrated Circuit 7408: Quad 2-input AND gate

More complex integrated circuits include binary adders (half-adder, full adder used to perform binary additions) and flip-flop circuits used to implement volatile memory.

List of 7400 series integrated circuits:
https://en.wikipedia.org/wiki/List_of_7400_series_integrated_circuits

Mirco-Processors?


A microprocessor is a computer processor which incorporates the functions of a computer’s central processing unit (CPU) on a single integrated circuit (or at most a few integrated circuits). The microprocessor is a multipurpose, clock driven, register based, digital-integrated circuit which accepts binary data as input, processes it according to instructions stored in its memory, and provides results as output.
A microprocessor is a computer processor which incorporates the functions of a computer's central processing unit (CPU) on a single integrated circuit

A microprocessor is a computer processor which incorporates the functions of a computer’s central processing unit (CPU) on a single integrated circuit

The Lost Roman Sundial

Roman Britain was a period of nearly 400 years between AD 43 to AD 410 when large parts of Great Britain were under occupation by the Roman Empire. During this period, the Romans built roads and architectural structures that can still be seen today. These include military structures such as forts and walls (including Hadrian’s Wall), Roman baths and aqueducts.

The Romans also introduced a number system based on roman numerals. These roman numerals are still used today, for instance on most analogue clocks, even though mechanical clocks did not exist at the time. Three main types of timepieces were used in ancient Roman times: The sundial, the klepsydra, and the obelisk.

A team of archaeologists has recently discovered some old parchments that include a map of the old roman city of Bath, Somerset, UK (Aquae Sulis) covered with Roman numerals from I to L (1 to 50). They also found 12 encoded messages and a piece of a golden sundial that they believed belonged to emperor Claudius. The legend tells that the sundial was broken in 13 pieces which were spread out and buried all over the city of Bath. The archaeologists would need your help to decode these messages, which they believe will help them locate the 12 remaining pieces of the lost golden sundial!
The Lost Roman Sundial – Code Breaking ChallengeOpen in New Window

Art Expo – Code Breaking Challenge

The most prestigious art exhibition is about to start at Tate Modern, London, UK. For the purpose of this exhibition, paintings from all over the world have been securely transported to London using a state of the art protection system called the multi-safe.

The multi-safe contains 12 individual locked compartments which are large enough to store one painting each. Each compartment is locked using a rotating combination locking system. Each combination consists of 3 numbers.

For security purposes, the actual combinations are kept secret and the Gallery manager has only been given access to 12 coding puzzles that will be necessary to retrieve the combinations and unlock the multi-safe 12 compartments. The gallery manager needs you to help him access to the world’s 12 most famous paintings before the gran opening of the Expo Art exhibition.

Before attempting this task, you should practice unlocking this padlock, by spinning the padlock wheel and using the combination provided below:

You now have under 1 hour to unlock the 12 compartments of the secure artwork storing safe. Good luck!

Art-Expo – Code Breaking ChallengeOpen in New Window

Understanding Binary Data

01101001
0 and 255
65,535
binary data
8 bits
bits
odd
least significant
text files
transistor
511
even
Byte
most significant
The key electronic component that you will find in any computer system is called a . The CPU of a computer contains billions of transistors. A transistor is an electronic switch that can be turned on (1) or off (0). This is the reason why computers can only process also called digital data.

Binary data is made of (short for binary digits) of data: 0s and 1s. Everything that is stored on a computer must be in binary form. This includes, numbers, , images, sound files and video clips.

So let’s start with numbers: Using of data you can form a : For instance is a Byte of data. A Byte of data can be used to represent any denary number between . You can easily convert a denary number into binary and vice versa using the following conversion table:

Using this conversion table, you can see that the bit on the left is the bit and is worth 128, whereas the bit on the right is the bit as it is only worth 1.

You will hence notice that in Binary an number will always have 1 as its least significant bit, whereas an number will always have 0 as its least significant bit.

To make a number higher than 255, you will need to use extra bits, added to the left of this conversion table. e.g. Using 9 bits instead of 8 would allow you to store numbers up to , and using 2 Bytes (16 bits) would allow you to store numbers from 0 to

Now that you understand how numbers can be stored into binary, you can investigate further how text files, images and sound files can also be stored in binary: