Edit: Apparently, my original answer of using Technet is incorrect if you plan on testing custom code with the Technet-provided products. I'm not going to comment on whether it's illegal or not, since I Am Not A Lawyer, Nor Do I Play One On TV, but it is clearly a violation of MS's license agreement to do it. So, if you want to test custom code on MS products, apparently you will need to grab one of the MSDN subscriptions. My apologies for any confusion this may have caused.
Less expensive than MSDN (over $1000 I believe) is MS Technet Plus ($349 for download-only; $249 to renew). Since you are only asking for operating systems, not developer tools. Technet includes everything MS has except Visual Studio and related. I use this for building systems within my VMWare testbed. 10 licenses per OS.
There are 32-bit and 64-bit versions of all their OS and servers, plus legacy stuff going back to MS-DOS.
Information here: http://technet.microsoft.com/en-us/subscriptions/default.aspx