Hi i need to create a trace table for a piece of code that was given to me for my studies, how ever we have been given no lessons on how to do it, and i cant seem to find any where that explains it. The idea of the program is to convert decimal numbers to binary. Well here is the code;
I need to Dry-run the code starting with DecimalNumber equal to 7 and again with DecimalNumber equal to 254. Below is what i have done however it has been marked wrong;Code:Value = 1 Do While DecimalNumber <> 0 Digit = (DecimalNumber Mod 2) BinaryNumber = BinaryNumber & Digit DecimalNumber = DecimalNumber \ 2 Value = Value * 2 Loop Output BinaryNumber
Can anyone help, or know a good tutorial on how to do these, thx in advance.