File:  [CSRG BSD Unix] / 43BSD / contrib / icon / libtest / t-bitops.icn
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

link "../ilib/bitops"

procedure main()
   while b1 := bitstring(read()) do {
      b2 := bitstring(read()) | break
      write(decimal(b1))
      write(decimal(b2))
      write("and=",and(b1,b2))
      write("not1=",neg(b1))
      write("not2=",not(b2))
      write("or=",or(b1,b2))
      write("exor=",exor(b1,b2))
      }
end


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.