Static Zero

Writing What We Want

Static Zero header image 4

Entries Tagged as 'Programming'

Swap variables without temporaries (XOR swap)

May 25th, 2008 · No Comments · Programming, Random

Swapping variables has always been a bit of an annoyance while programming. It doesn’t matter whether you code in C, Java, MIPS, or any other language, you’ve really only had one way to swap variables.

[Read more →]

Tags:

All About Binary

April 24th, 2008 · No Comments · Programming, Random

This post contains information on how to convert decimal numbers to binary, 1’s complement, 2’s complement, and binary coded decimal. I’ve tried breaking it up to keep it somewhat organized, so hopefully you can follow.

[Read more →]

Tags:·····

Convert Decimal to 2’s Complement Binary in C

April 24th, 2008 · 2 Comments · Programming

I was writing a program recently, and I needed a function that would convert a given decimal number to 2’s Complement (signed) binary. It’s simple enough to convert an unsigned integer to binary, but the sign (especially 2’s comp) makes it tricky. Since I couldn’t find a function to do this for me, I […]

[Read more →]

Tags:·