computer science

There are 1 entries for the tag computer science

Negative Base Numbering Systems

UPDATE: I updated the article a bit to better explain decimal expansion to negabinary Ok, here is where I go and really geek out a bit. Scott presents a simple javascript to display negative numbers as red. He takes a nice clean straightforward approach by using javascript to inject a CSS class on specific elements that have a negative number. As his script merrily iterates its way through the page’s elements, it checks the values of the element to see if the first character is a “-” (dash). And this works just fine for the majority of you people so thoroughly...