converter-with-implemented-addition-logiic.ly

This study was conducted for the purpose of creating a program that is used with arithmetic arrays and sequences, and simultaneously transforms binary numbers to decimal form. The user inputs the first number and the difference between the inputted number and its following, then the machine outputs every “nth” number from an arithmetic array. However, the idea was simplified to fit the scope of the course Computer Organisation and Architecture. The methods and algorithms used in this project can be easily adjusted to work with larger numbers and perform more complex operations. The user is expected to input the first number of the array which must be a four bit binary number, and the difference which is required to be a two bit binary number and will not be sign extended. The machine outputs every number in the array as a decimal number and will inform us when an overflow occurs. To simulate the characteristics and use of logic circuits, the simulator “Logic.ly” was used. The purpose of this project was never meant to be creating the most optimal way to perform this one operation. Instead, the goal was simply just providing the environment in which as many operations as possible would be performed on arithmetic arrays, with minimal changes in circuit implementation. The machine was created to expect the following inputs: • Parameter which determines whether the binary numbers will be seen as signed or unsigned by the program. • A, which represents the first element of an array. • B, which represents the difference between any element of an array and its following number, and will not be sign extended. • Parameter which allows the program to start outputting every following number of the array. • A push button that is used for restarting the program’s execution. The simulator will output the current number in decimal digits and the lightbulbs that represent the sign will show a plus if the number is positive, and a minus when the number is negative. Another lightbulb is meant to inform the users when the overflow occurs; once the lightbulb turns off, after previously having been turned on, the overflow has occurred. If the overflow occurs at least once, the results are no longer valid and the program needs to be manually restarted.