mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			148 lines
		
	
	
		
			9.8 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
			
		
		
	
	
			148 lines
		
	
	
		
			9.8 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
| \documentclass[12pt]{article}
 | |
| 
 | |
| \usepackage{amssymb, amsmath, amsfonts, amsthm, graphicx, tcolorbox}
 | |
| 
 | |
| \usepackage{arydshln}
 | |
| 
 | |
| \parskip = .2in
 | |
| \parindent  = 0in
 | |
| 
 | |
| \pagestyle{empty}
 | |
| 
 | |
| %==========
 | |
| %==========
 | |
| 
 | |
| \begin{document}
 | |
| 
 | |
| 
 | |
| 
 | |
| X = 0.1011 0111 10 (734/1024)
 | |
| 
 | |
| S = 0.1101 1000 11\ 00 (3468/4096), negative sticky bit
 | |
| {\small
 | |
| \begin{center}
 | |
| \begin{tabular}{ccccc}
 | |
|             &$X             $&$         0000.1011\ 0111\ 1000   $&          &$S_0={\color{blue}0001}.0000\ 0000\ 0000$\\
 | |
|             &$WS_0=4(X-1)   $&$         1110.1101\ 1110\ 0000   $&          &$SM_0={\color{blue}0000}.0000\ 0000\ 0000\phantom{M}$\\
 | |
|             &$WC_0          $&$         0000.0000\ 0000\ 0000   $&          &$K_0=0001.0000\ 0000\ 0000\ $\\
 | |
|             &                &                                   &          &$C_0=1111.0000\ 0000\ 0000\,$\\
 | |
|     \hdashline\\
 | |
|     Step 1: &$WS_0          $&$         1110.1101\ 1110\ 0000   $&          &\\
 | |
|             &$WC_0          $&$         0000.0000\ 0000\ 0000   $&          &($W_{msbs}=1110.110\ \text{so}\ s_1=-1$)\\
 | |
|             &$F_1=2S_0-K_1$&${\color{blue}0001.11}00\ 0000\ 0000$&          &$S_1={\color{blue}0000.11}00\ 0000\ 0000$\\
 | |
|             &                &                                   &          &$SM_1={\color{blue}0000.10}00\ 0000\ 0000\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         1111.0001\ 1110\ 0000   $&$\ll2    $&$K_1=0000.0100\ 0000\ 0000\ $\\
 | |
|             &$carry         $&$         0001.1000\ 0000\ 0000   $&$\ll2    $&$C_1=1111.1100\ 0000\ 0000\,$\\
 | |
|     \hdashline\\    
 | |
|     Step 2: &$WS_1          $&$         1100.0111\ 1000\ 0000   $&          &\\
 | |
|             &$WC_1          $&$         0110.0000\ 0000\ 0000   $&          &($W_{msbs}=0010.011\ \text{so}\ s_2=2$)\\
 | |
|             &$F_2=-4S_1-4K_2$&${\color{blue}1100.1100}\ 0000\ 0000$&        &$S_2={\color{blue}0000.1110}\ 0000\ 0000$\\
 | |
|             &                &                                   &          &$SM_2={\color{blue}0000.1101}\ 0000\ 0000\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         0110.1011\ 1000\ 0000   $&$\ll2    $&$K_2=0000.0001\ 0000\ 0000\ $\\
 | |
|             &$carry         $&$         1000.1000\ 0000\ 0000   $&$\ll2    $&$C_2=1111.1111\ 0000\ 0000\,$\\
 | |
|     \hdashline\\
 | |
|     Step 3: &$WS_2          $&$         1010.1110\ 0000\ 0000   $&          &\\
 | |
|             &$WC_2          $&$         0010.0000\ 0000\ 0000   $&          &($W_{msbs}=1100.111\ \text{so}\ s_3=-2$)\\
 | |
|             &$F_3=4S_2-4K_3$&${\color{blue}0011.0111\ 00}00\ 0000$&         &$S_3={\color{blue}0000.1101\ 10}00\ 0000$\\
 | |
|             &                &                                   &          &$SM_3={\color{blue}0000.1101\ 01}00\ 0000\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         1011.1001\ 0000\ 0000   $&$\ll2    $&$K_3=0000.0000\ 0100\ 0000\ $\\
 | |
|             &$carry         $&$         0100.1100\ 0000\ 0000   $&$\ll2    $&$C_3=1111.1111\ 1100\ 0000\,$\\
 | |
|     \hdashline\\
 | |
|     Step 4: &$WS_3          $&$         1110.0100\ 0000\ 0000   $&          &\\
 | |
|             &$WC_3          $&$         0011.0000\ 0000\ 0000   $&          &($W_{msbs}=0001.010\ \text{so}\ s_4=1$)\\
 | |
|             &$F_4=-2S_3-K_4$&${\color{blue}1110.0100\ 1111}\ 0000$&        &$S_4={\color{blue}0000.1101\ 1001}\ 0000$\\
 | |
|             &                &                                   &          &$SM_4={\color{blue}0000.1101\ 1000}\ 0000\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         0011.0000\ 1111\ 0000   $&$\ll2    $&$K_4=0000.0000\ 0001\ 0000\ $\\
 | |
|             &$carry         $&$         1100.1000\ 0000\ 0000   $&$\ll2    $&$C_4=1111.1111\ 1111\ 0000\,$\\
 | |
|     \hdashline\\
 | |
|     Step 5: &$WS_4          $&$         1100.0011\ 1100\ 0000   $&          &\\
 | |
|             &$WC_4          $&$         0010.0000\ 0000\ 0000   $&          &($W_{msbs}=1110.001\ \text{so}\ s_5=-1$)\\
 | |
|             &$F_5=2S_4-K_5 $&${\color{blue}0001.1011\ 0001\ 11}00$&        &$S_5={\color{blue}0000.1101\ 1000\ 11}00$\\
 | |
|             &                &                                   &          &$SM_5={\color{blue}0000.1101\ 1000\ 10}00\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         1111.1000\ 1101\ 1100   $&$\ll2    $&$K_5=0000.0000\ 0000\ 0100\ $\\
 | |
|             &$carry         $&$         0000.0110\ 0000\ 0000   $&$\ll2    $&$C_5=1111.1111\ 1111\ 1100\,$\\
 | |
|     \hdashline\\
 | |
|     Step 6: &$WS_5          $&$         1110.0011\ 0111\ 0000   $&          &\\
 | |
|             &$WC_5          $&$         0001.1000\ 0000\ 0000   $&          &($W_{msbs}=1111.101\ \text{so}\ s_6=0$)\\
 | |
|             &$F_6=0        $&${\color{blue}0000.0000\ 0000\ 0000}$&         &$S_6={\color{blue}0000.1101\ 1000\ 1100}$\\
 | |
|             &                &                                   &          &$SM_6={\color{blue}0000.1101\ 1000\ 1011}\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         1111.1011\ 0111\ 0111   $&$\ll2    $&$K_6=0000.0000\ 0000\ 0001\ $\\
 | |
|             &$carry         $&$         0000.0000\ 0000\ 0000   $&$\ll2    $&$C_6=1111.1111\ 1111\ 1111\,$\\
 | |
|     \hdashline\\
 | |
|     Terminate&Square Root&0000.11 01\ 10 00\ 10 (11)
 | |
| \end{tabular}
 | |
| \end{center}
 | |
| }
 | |
| 
 | |
| X = 0.1001\ 0101\ 00 (596/1024)
 | |
| 
 | |
| S = 0.1100 0011 01\ 01 (3125/4096)
 | |
| {\small
 | |
| \begin{center}
 | |
| \begin{tabular}{ccccc}
 | |
|             &$X             $&$         0000.1001\ 0101\ 0000   $&          &$S_0={\color{blue}0001}.0000\ 0000\ 0000$\\
 | |
|             &$WS_0=4(X-1)   $&$         1110.0101\ 0100\ 0000   $&          &$SM_0={\color{blue}0000}.0000\ 0000\ 0000\phantom{M}$\\
 | |
|             &$WC_0          $&$         0000.0000\ 0000\ 0000   $&          &$K_0=0001.0000\ 0000\ 0000\ $\\
 | |
|             &                &                                   &          &$C_0=1111.0000\ 0000\ 0000\,$\\
 | |
|     \hdashline\\
 | |
|     Step 1: &$WS_0          $&$         1110.0101\ 0100\ 0000   $&          &\\
 | |
|             &$WC_0          $&$         0000.0000\ 0000\ 0000   $&          &($W_{msbs}=1110.010\ \text{so}\ s_1=-1$)\\
 | |
|             &$F_1=2S_0-K_1  $&${\color{blue}0001.11}00\ 0000\ 0000$&        &$S_1={\color{blue}0000.11}00\ 0000\ 0000$\\
 | |
|             &                &                                   &          &$SM_1={\color{blue}0000.10}00\ 0000\ 0000\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         1111.1001\ 0100\ 0000   $&$\ll2    $&$K_1=0000.0100\ 0000\ 0000\ $\\
 | |
|             &$carry         $&$         0000.1000\ 0000\ 0000   $&$\ll2    $&$C_1=1111.1100\ 0000\ 0000\,$\\
 | |
|     \hdashline\\    
 | |
|     Step 2: &$WS_1          $&$         1110.0101\ 0000\ 0000   $&          &\\
 | |
|             &$WC_2          $&$         0010.0000\ 0000\ 0000   $&          &($W_{msbs}=0000.010\ \text{so}\ s_2=0$)\\
 | |
|             &$F_2=0       $&${\color{blue}0000.0000}\ 0000\ 0000$&          &$S_2={\color{blue}0000.1100}\ 0000\ 0000$\\
 | |
|             &                &                                   &          &$SM_2={\color{blue}0000.1110}\ 0000\ 0000\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         1100.0101\ 0000\ 0000   $&$\ll2    $&$K_2=0000.0001\ 0000\ 0000\ $\\
 | |
|             &$carry         $&$         0100.0000\ 0000\ 0000   $&$\ll2    $&$C_2=1111.1111\ 0000\ 0000\,$\\
 | |
|     \hdashline\\
 | |
|     Step 3: &$WS_2          $&$         0001.0100\ 0000\ 0000   $&          &\\
 | |
|             &$WC_2          $&$         0000.0000\ 0000\ 0000   $&          &($W_{msbs}=0001.010\ \text{so}\ s_3=1$)\\
 | |
|             &$F_3=-2S_2-K_3$&${\color{blue}1110.0111\ 11}00\ 0000$&         &$S_3={\color{blue}0000.1100\ 01}00\ 0000$\\
 | |
|             &                &                                   &          &$SM_3={\color{blue}0000.1100\ 00}00\ 0000\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         1111.0011\ 1100\ 0000   $&$\ll2    $&$K_3=0000.0000\ 0100\ 0000\ $\\
 | |
|             &$carry         $&$         1000.1000\ 0000\ 0000   $&$\ll2    $&$C_3=1111.1111\ 1100\ 0000\,$\\
 | |
|     \hdashline\\
 | |
|     Step 4: &$WS_3          $&$         1100.1111\ 0000\ 0000   $&          &\\
 | |
|             &$WC_3          $&$         0010.0000\ 0000\ 0000   $&          &($W_{msbs}=1110.111\ \text{so}\ s_4=-1$)\\
 | |
|             &$F_4=2S_3-K_3  $&${\color{blue}0001.1000\ 0111}\ 0000$&        &$S_4={\color{blue}0000.1100\ 0011}\ 0000$\\
 | |
|             &                &                                   &          &$SM_4={\color{blue}0000.1100\ 0010}\ 0000\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         1111.0111\ 0111\ 0000   $&$\ll2    $&$K_4=0000.0000\ 0001\ 0000\ $\\
 | |
|             &$carry         $&$         0001.0000\ 0000\ 0000   $&$\ll2    $&$C_4=1111.1111\ 1111\ 0000\,$\\
 | |
|     \hdashline\\
 | |
|     Step 5: &$WS_4          $&$         1101.1101\ 1100\ 0000   $&          &\\
 | |
|             &$WC_4          $&$         0100.0000\ 0000\ 0000   $&          &($W_{msbs}=0001.110\ \text{so}\ s_5=1$)\\
 | |
|             &$F_5=-2S_4-K_4 $&${\color{blue}1110.0111\ 1001\ 11}00$&        &$S_5={\color{blue}0000.1100\ 0011\ 01}00$\\
 | |
|             &                &                                   &          &$SM_5={\color{blue}0000.1100\ 0011\ 00}00\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         0111.1010\ 0101\ 1100   $&$\ll1    $&$K_5=0000.0000\ 0000\ 0100\ $\\
 | |
|             &$carry         $&$         1000.1011\ 0000\ 0000   $&$\ll1    $&$C_5=1111.1111\ 1111\ 1100\,$\\
 | |
|     \hdashline\\
 | |
|     Step 6: &$WS_5          $&$         1110.1001\ 0111\ 0000   $&          &\\
 | |
|             &$WC_5          $&$         0010.1100\ 0000\ 0000   $&          &($W_{msbs}=0001.010\ \text{so}\ s_6=1$)\\
 | |
|             &$F_6=          $&$                                 $&          &$S_5={\color{blue}0000.1100\ 0011\ 0101}$\\
 | |
|             &                &                                   &          &$SM_5={\color{blue}0000.1100\ 0011\ 0100}\phantom{M}$\\
 | |
|     \cline{2-3}
 | |
|             &$sum           $&$         0001.1110\ 1001\ 0111   $&$\ll1    $&$K_5=0000.0000\ 0000\ 0001\ $\\
 | |
|             &$carry         $&$         1110.0010\ 1100\ 0000   $&$\ll1    $&$C_5=1111.1111\ 1111\ 1111\,$\\
 | |
|     \hdashline\\
 | |
|     Terminate
 | |
| \end{tabular}
 | |
| \end{center}
 | |
| }
 | |
| 
 | |
| \end{document}
 |