summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.~lock.project description.24.doc#1
-rwxr-xr-xbooth_multiplier.py22
-rw-r--r--pheudo_code0
-rw-r--r--project description.24.docbin0 -> 30208 bytes
-rw-r--r--report/report.aux2
-rw-r--r--report/report.log170
-rw-r--r--report/report.pdfbin0 -> 110007 bytes
-rw-r--r--report/report.tex36
8 files changed, 226 insertions, 5 deletions
diff --git a/.~lock.project description.24.doc# b/.~lock.project description.24.doc#
new file mode 100644
index 0000000..bed60cd
--- /dev/null
+++ b/.~lock.project description.24.doc#
@@ -0,0 +1 @@
+,indigo,indigo,11.04.2024 20:05,file:///home/indigo/.config/libreoffice/4; \ No newline at end of file
diff --git a/booth_multiplier.py b/booth_multiplier.py
index afd6710..dc32263 100755
--- a/booth_multiplier.py
+++ b/booth_multiplier.py
@@ -91,8 +91,12 @@ def booth_mod(multiplier, multiplicand, length):
return (result, operations)
if __name__ == "__main__":
- headers = ['multiplicand', 'multiplier', 'result (bin)', 'result (hex)']
- table = []
+ result_headers = ['multiplicand', 'multiplier', 'result (bin)', 'result (hex)']
+ result_table = []
+
+ opcount_headers = ['multiplicand', 'multiplier', 'length', 'booth', 'modified booth']
+ opcount_table = []
+
lengths = [] # for matplotlib plot
ops_booth = []
ops_mod_booth = []
@@ -106,7 +110,7 @@ if __name__ == "__main__":
multiplicand = int(operation.split(" ")[0], 2)
multiplier = int(operation.split(" ")[1], 2)
-
+ # get result and operation count of both algorithims
result_booth = booth(multiplier, multiplicand, length)
result_mod_booth = booth_mod(multiplier, multiplicand, length)
@@ -115,11 +119,19 @@ if __name__ == "__main__":
ops_mod_booth.append(result_mod_booth[1])
lengths.append(length)
- table.append([bin(multiplicand), bin(multiplier), bin(result_booth[0]), hex(result_booth[0])])
+ #gather data for report results table
+ result_table.append([bin(multiplicand), bin(multiplier), bin(result_booth[0]), hex(result_booth[0])])
+
+ #gather data for test function to check if simulator is working
debug_results.append([multiplicand, multiplier, result_booth[0], result_mod_booth[0], length])
+ #gather data for operation count table
+ opcount_table.append([bin(multiplicand), bin(multiplier), length, result_booth[1], result_mod_booth[1]])
+
debug(debug_results)
- print(tabulate(table, headers))
+ print(tabulate(result_table, result_headers))
+ print(tabulate(opcount_table, opcount_headers))
+
# generate graph
plt.plot(lengths, ops_booth, '^--m', label='booths algorithim')
diff --git a/pheudo_code b/pheudo_code
deleted file mode 100644
index e69de29..0000000
--- a/pheudo_code
+++ /dev/null
diff --git a/project description.24.doc b/project description.24.doc
new file mode 100644
index 0000000..21d4642
--- /dev/null
+++ b/project description.24.doc
Binary files differ
diff --git a/report/report.aux b/report/report.aux
new file mode 100644
index 0000000..b640121
--- /dev/null
+++ b/report/report.aux
@@ -0,0 +1,2 @@
+\relax
+\gdef \@abspage@last{1}
diff --git a/report/report.log b/report/report.log
new file mode 100644
index 0000000..15b97b2
--- /dev/null
+++ b/report/report.log
@@ -0,0 +1,170 @@
+This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/Arch Linux) (preloaded format=pdflatex 2024.4.11) 11 APR 2024 21:52
+entering extended mode
+ restricted \write18 enabled.
+ %&-line parsing enabled.
+**report.tex
+(./report.tex
+LaTeX2e <2023-11-01> patch level 1
+L3 programming layer <2024-02-20>
+(/usr/share/texmf-dist/tex/latex/base/article.cls
+Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
+(/usr/share/texmf-dist/tex/latex/base/size12.clo
+File: size12.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
+)
+\c@part=\count188
+\c@section=\count189
+\c@subsection=\count190
+\c@subsubsection=\count191
+\c@paragraph=\count192
+\c@subparagraph=\count193
+\c@figure=\count194
+\c@table=\count195
+\abovecaptionskip=\skip48
+\belowcaptionskip=\skip49
+\bibindent=\dimen140
+)
+(/usr/share/texmf-dist/tex/latex/geometry/geometry.sty
+Package: geometry 2020/01/02 v5.9 Page Geometry
+
+(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty
+Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
+\KV@toks@=\toks17
+)
+(/usr/share/texmf-dist/tex/generic/iftex/ifvtex.sty
+Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
+
+(/usr/share/texmf-dist/tex/generic/iftex/iftex.sty
+Package: iftex 2022/02/03 v1.0f TeX engine tests
+))
+\Gm@cnth=\count196
+\Gm@cntv=\count197
+\c@Gm@tempcnt=\count198
+\Gm@bindingoffset=\dimen141
+\Gm@wd@mp=\dimen142
+\Gm@odd@mp=\dimen143
+\Gm@even@mp=\dimen144
+\Gm@layoutwidth=\dimen145
+\Gm@layoutheight=\dimen146
+\Gm@layouthoffset=\dimen147
+\Gm@layoutvoffset=\dimen148
+\Gm@dimlist=\toks18
+)
+(/usr/share/texmf-dist/tex/latex/titling/titling.sty
+Package: titling 2009/09/04 v2.1d maketitle typesetting
+\thanksmarkwidth=\skip50
+\thanksmargin=\skip51
+\droptitle=\skip52
+)
+(/usr/share/texmf-dist/tex/latex/psnfss/helvet.sty
+Package: helvet 2020/03/25 PSNFSS-v9.3 (WaS)
+)
+(/usr/share/texmf-dist/tex/latex/tex-gyre/tgpagella.sty
+Package: tgpagella 2009/09/27 v1.2 TeX Gyre Pagella as default roman family
+
+(/usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
+Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO)
+
+(/usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
+Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO)
+)
+(/usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
+Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO)
+)))
+LaTeX Font Info: Trying to load font information for OT1+qpl on input line 2
+4.
+
+(/usr/share/texmf-dist/tex/latex/tex-gyre/ot1qpl.fd
+File: ot1qpl.fd 2009/09/25 v1.2 font definition file for OT1/qpl
+)
+(/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+File: l3backend-pdftex.def 2024-02-20 L3 backend support: PDF output (pdfTeX)
+\l__color_backend_stack_int=\count199
+\l__pdf_internal_box=\box51
+) (./report.aux)
+\openout1 = `report.aux'.
+
+LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 24.
+LaTeX Font Info: ... okay on input line 24.
+LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 24.
+LaTeX Font Info: ... okay on input line 24.
+LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 24.
+LaTeX Font Info: ... okay on input line 24.
+LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 24.
+LaTeX Font Info: ... okay on input line 24.
+LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 24.
+LaTeX Font Info: ... okay on input line 24.
+LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 24.
+LaTeX Font Info: ... okay on input line 24.
+LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 24.
+LaTeX Font Info: ... okay on input line 24.
+*geometry* driver: auto-detecting
+*geometry* detected driver: pdftex
+*geometry* verbose mode - [ preamble ] result:
+* driver: pdftex
+* paper: a4paper
+* layout: <same size as paper>
+* layoutoffset:(h,v)=(0.0pt,0.0pt)
+* modes:
+* h-part:(L,W,R)=(72.26999pt, 452.9679pt, 72.26999pt)
+* v-part:(T,H,B)=(72.26999pt, 700.50687pt, 72.26999pt)
+* \paperwidth=597.50787pt
+* \paperheight=845.04684pt
+* \textwidth=452.9679pt
+* \textheight=700.50687pt
+* \oddsidemargin=0.0pt
+* \evensidemargin=0.0pt
+* \topmargin=-37.0pt
+* \headheight=12.0pt
+* \headsep=25.0pt
+* \topskip=12.0pt
+* \footskip=30.0pt
+* \marginparwidth=44.0pt
+* \marginparsep=10.0pt
+* \columnsep=10.0pt
+* \skip\footins=10.8pt plus 4.0pt minus 2.0pt
+* \hoffset=0.0pt
+* \voffset=0.0pt
+* \mag=1000
+* \@twocolumnfalse
+* \@twosidefalse
+* \@mparswitchfalse
+* \@reversemarginfalse
+* (1in=72.27pt=25.4mm, 1cm=28.453pt)
+
+LaTeX Font Info: Trying to load font information for OT1+phv on input line 2
+5.
+(/usr/share/texmf-dist/tex/latex/psnfss/ot1phv.fd
+File: ot1phv.fd 2020/03/25 scalable font definitions for OT1/phv.
+)
+LaTeX Font Info: External font `cmex10' loaded for size
+(Font) <14.4> on input line 25.
+LaTeX Font Info: External font `cmex10' loaded for size
+(Font) <7> on input line 25.
+ [1
+
+{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}{/usr/share/texmf-dist/fonts
+/enc/dvips/base/8r.enc}{/usr/share/texmf-dist/fonts/enc/dvips/tex-gyre/q-rm.enc
+}] (./report.aux)
+ ***********
+LaTeX2e <2023-11-01> patch level 1
+L3 programming layer <2024-02-20>
+ ***********
+ )
+Here is how much of TeX's memory you used:
+ 1608 strings out of 476076
+ 27325 string characters out of 5793775
+ 1931187 words of memory out of 5000000
+ 23743 multiletter control sequences out of 15000+600000
+ 581301 words of font info for 49 fonts, out of 8000000 for 9000
+ 14 hyphenation exceptions out of 8191
+ 57i,6n,65p,943b,225s stack positions out of 10000i,1000n,20000p,200000b,200000s
+</usr/share/texmf-dist/fonts/type1/public/tex-gyre/qplb.pfb></usr/share/texmf
+-dist/fonts/type1/public/tex-gyre/qplr.pfb></usr/share/texmf-dist/fonts/type1/u
+rw/helvetic/uhvr8a.pfb>
+Output written on report.pdf (1 page, 110007 bytes).
+PDF statistics:
+ 25 PDF objects out of 1000 (max. 8388607)
+ 15 compressed objects within 1 object stream
+ 0 named destinations out of 1000 (max. 500000)
+ 1 words of extra memory for PDF output out of 10000 (max. 10000000)
+
diff --git a/report/report.pdf b/report/report.pdf
new file mode 100644
index 0000000..899037f
--- /dev/null
+++ b/report/report.pdf
Binary files differ
diff --git a/report/report.tex b/report/report.tex
new file mode 100644
index 0000000..581d2ba
--- /dev/null
+++ b/report/report.tex
@@ -0,0 +1,36 @@
+\documentclass[12pt]{article}
+\usepackage{geometry}
+\usepackage{titling}
+\usepackage{helvet}
+\usepackage{tgpagella} % text only
+
+
+\geometry{
+ a4paper,
+ lmargin=1in,
+ rmargin=1in,
+ tmargin=1in,
+ bmargin=1in,
+}
+\setlength{\droptitle}{-3em} % This is your set screw
+
+
+
+
+\title{\fontfamily{phv}\selectfont
+Analyzing Performance of Booth’s Algorithm and Modified Booth’s Algorithm}
+\author{Brett Weiland}
+
+\begin{document}
+\maketitle
+\begin{abstract}
+In this paper, the performance of Booth’s Algorithm is compared to modified Booth's Algorithm. Each multiplier is simulated in Python, and performance is observed by counting the number of add and subtract operations for various inputs. Results are analyzed and discussed to highlight the tradeoffs between the two multipliers.
+\end{abstract}
+\section*{Introduction}
+Multiplication is among the most time consuming mathematical operations for processors. In many applications, the time it takes to multiply dramatically influences the speed of the program. Applications of digital signal processing (such as audio modification and image processing) require constant multiply and accumulate operations for functions such as fast fourier transformations and convolutions. Other applications are heavily dependent on multiplying large matrices, such as machine learning, 3D graphics and data analysis. In such scenarios, the speed of multiplication is vital. Consequently, most modern processors implement hardware multiplication. However, not all multiplication circuits are equal; there is often a stark contrast between performance and hardware complexity. To further complicate things, multiplication circuits perform differently depending on what numbers are being multiplied.
+\section*{Implementation}
+
+\section*{Results}
+\section*{Analysis}
+\section*{Conclusion}
+\end{document}