Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
q1q0
#tclsh 8.6 proc dec2bin int { set binRep [binary format c $int] binary scan $binRep B* binStr return $binStr } set v1 -10 set v2 10 set a [expr abs($v1)] puts $a if { $v1 == $a } { set M [ dec2bin $a ] set m [ dec2bin $v1 ] } else { set M [ dec2bin $a ] set m [ dec2bin $v1 ] } puts $M puts $m set q "[ dec2bin $v2 ]" puts q$q set A 0000 set n 4 while {$n != 0} { puts [lindex [lindex [split $q ""] 7 ] 6] set q1 [lindex [split $q ""] 6 ] #puts $q0 #puts $q1 #if { [join $q1 $q0] == 10 } { #puts $M} set n [expr $n -1] }
run
|
edit
|
history
|
help
0
Bin mul float
Add Dec2bin
Tcl code gave error:invalid command name "new" while executing "new Simulator"
Working for neg
binary multiplication
NISP - Planning ID Unit Test
Perfect neg float bin multiplier
NISP - Planning ID Unit Test
Trying bin mul floating point
NISP - Planning ID Unit Test