Booth's Sequential Multiplier Simulator, version 1.0
Booth's Sequential Multiplier Simulator's relase note, version 1.0
Installation note. User guide.Relase Note.
"Booth's Sequential Multiplier Simulator", realized in javascript / jQuery, is composite by these functions:
start() |
This function checks that the input's format is correct and, subsequently, initialize the circuit's registers, creates the table and block the text boxes. |
next() |
This function checks if the inputs are loaded correctly and executes the operation checking the lesser important bit of the register Q with the function booth_check. This function change circuit's image, bit's value on image and refresh the table. |
reset() |
This function resets registers's value, flag, circuit's image, delete the old table and unlock the text boxes. |
init_val() |
Initialize the registers's values with the value acquired from text boxes. |
conversion(molt) |
Take the multiplier as paramater and return his negative value in two's complement. |
add(v_moltiplicatore,v_moltiplicando) |
Take as parameters multiplier and multiplicand and executes the bit to bit sum ignoring an eventual carry bit coming from the sum of most significant bit(bit of sign extention). |
booth_check(registerQ) |
Take as parameter the register Q checking two less significant bit and it return the value that indicates the operation to be execute. It returns 0 and 3 to do only the right aritmetical shift, 1 to do sum - shift, 2 to do subtract - shift. |
shiftM(registerA,registerQ) shiftA(registerA) |
These two functions are complementary and they do the right aritmetical shift considering the registers A and Q as a unique register. |
control(val) |
This function checks that the values in the textboxes are part of the alphabet [1,0]. |
controlfield() |
It checks that input's fields are not empty or containing values out of the range [0-1] (using the function control(val) it returns the error's corresponding number. |
checkalert() |
Using the value returned by the function controlfield(), this function informs of eventual errors in approriate messages. |
print_circuit() |
This function prints the registers's values in the appropriate spaces in the image. |
booth_value_printing() |
This function highlights Q's two least significant bits that pinpoints the operation to execute. |
booth_value_printing_reset() |
This function restores the bits highlighted by the function booth_value_printing() to their original state. |
final_value() |
This function , at the end of the execution of the program, highlights the result contained in the registers Q and A leaving out. A's most significant bit and Q's least significant bit. |
reset_bit_color() |
This function resets the bits in the image to their original state. |
Compilation:
The following project, is browser based and it doesn't need any compilation because the browser will interpretate the code.
Testing and development:
Text editor: Notepad++.
Framework: Zurb Foundation 5.0, jQuery
Tested on Windows/Linux with compatible browsers (see Installation Notes).
Date: 28 July 2014
Simulators of Architettura degli elaboratori (2013-2014, U. Catania, DMI)