133 Optimised Euclidean Algorithm

133 : Optimised Euclidean Algorithm

Design renderSelect Project123456789ONSW2
  • Author: Recep Said Dulger
  • Description: Finding gcd of 2 4-bit number
  • GitHub repository
  • Clock: 1000 Hz

How it works

This circuit finds the gcd (greatest common divisor) of 2 4-bit numbers which are entered by dip switch and it uses the Euclidean algorithm. Result displays by seven segment display. The algorithm has been optimized by designing the control unit and datapath.

How to test

Enter 4-bit 1st number by dip switches and set num_okey switch to 1. By doing that 1st number saved in register. Set num_okey switch to 0 and enter 2nd 4-bit number. Set num_okey switch to 0 and after that gcd result will appear in seven segment display.

External hardware

None

IO

#InputOutput
0clockssd_out[0]
1number[0]ssd_out[1]
2number[1]ssd_out[2]
3number[2]ssd_out[3]
4number[3]ssd_out[4]
5ssd_out[5]
6rstssd_out[6]
7num_okey