Thread: conversion
View Single Post
  #5 (permalink)  
Old March 18th, 2004, 05:28 AM
gbilios gbilios is offline
Authorized User
 
Join Date: Mar 2004
Posts: 33
Thanks: 0
Thanked 1 Time in 1 Post
Default

the first thing thats suppose to happen in toDecimal is convert a binary number to positive, only if the binary number is a positive. if the binary number was a negative it would convert it to a positive, add 1 (two's complement), then convert to decimal(result).

The original function toDecimal converted a binary number to decimal.
all i did was add code to it so i could enter a two's complement number
and deal with it. obviously my code is wrong.

thanks for helping me.





George N. Bilios
Reply With Quote