In this post we will create an Arithmetic & Logic Unit (ALU) using logic gates. The ALU is one of the main component of the CPU. It is used in the Execution stage of the FDE cycle to perform all…
A binary shift is a binary operation that consists of shifting all the digit of a binary number either to the left or to the right by a fixed amount. Binary shifts can be used to multiply a number by…
Binary comparators are logic gates circuit used to compare two binary inputs. There are two types of binary comparators: Equality Comparators are used to check if the two binary inputs (A and B) are equal or not. Magnitude Comparators are…
A decoder is a logic circuit that converts a coded input to a “decoded” output by converting the input into a different format. Binary decoders can be used to: Convert BCD/binary value into “denary format”, “octal format” or “hexadecimal format”,…
An equality comparator is a hardware electronic circuit made from logic gates that takes two binary numbers as input determines whether these are equal or not. Equality comparators and magnitude comparators (used to determine whether a binary input is larger,…
Calculating the square value of a number is a very straightforward process which consists of multiplying this number by itself. For instance: 152 = 15 x 15 = 225 The reverse operation which consists of calculating the square root of…
In this blog post, we will write a computer program to create and maintain a multimedia library of books, CDs and DVDs. The aim of this programming task is to demonstrate some key Object-Oriented Programming concepts such as: Creating Classes…
The aim of this challenge is to implement a Class in Python to maintain an MP3 Playlist. This class could be used when developing the software for a music App on a smartphone or an mp3 player. This MP3 playlist…
One of the key features of any e-commerce website is the shopping basket. It is used to let the end-users add products to their basket before proceeding to checkout. In this Python challenge we will create a Shopping Basket class…
In this blog post we will experiment using some of the key functions from the random library. Many Python games will involve some degree of “randomness” for the game to be more realistic and unpredictable. Flipping a coin, throwing a…