local fmt = require "fmt" local decimal = {0, 1, -1, 42} print("decimal two's complement") print("------- ----------------") for decimal as d do fmt.print(" %2d %3d", d, ~d + 1) end