// output of ./demo/bits/radix-2i-demo.cc: // Description: //% Representation of purely real and imaginary numbers in radix(2*i). //% The radix(2*i) representation for complex integers needs //% one digit (i.e., two bits) after the point. arg 1: 5 == ldn [Number of bits] default=5 -32: 111..... .1..1........... = (-32,0) ..11............ = (0,-32) -31: 111....1 .1..1........1.. = (-31,0) ..11.......1..1. = (0,-31) -30: 111...1. .1..1.......1... = (-30,0) ..11.......1.... = (0,-30) -29: 111...11 .1..1.......11.. = (-29,0) ..11......1...1. = (0,-29) -28: 111..1.. .1..11..11...... = (-28,0) ..11......1..... = (0,-28) -27: 111..1.1 .1..11..11...1.. = (-27,0) ..11......11..1. = (0,-27) -26: 111..11. .1..11..11..1... = (-26,0) ..11......11.... = (0,-26) -25: 111..111 .1..11..11..11.. = (-25,0) ......11......1. = (0,-25) -24: 111.1... .1..11..1....... = (-24,0) ......11........ = (0,-24) -23: 111.1..1 .1..11..1....1.. = (-23,0) ......11...1..1. = (0,-23) -22: 111.1.1. .1..11..1...1... = (-22,0) ......11...1.... = (0,-22) -21: 111.1.11 .1..11..1...11.. = (-21,0) ......11..1...1. = (0,-21) -20: 111.11.. .1..11...1...... = (-20,0) ......11..1..... = (0,-20) -19: 111.11.1 .1..11...1...1.. = (-19,0) ......11..11..1. = (0,-19) -18: 111.111. .1..11...1..1... = (-18,0) ......11..11.... = (0,-18) -17: 111.1111 .1..11...1..11.. = (-17,0) ......1.......1. = (0,-17) -16: 1111.... .1..11.......... = (-16,0) ......1......... = (0,-16) -15: 1111...1 .1..11.......1.. = (-15,0) ......1....1..1. = (0,-15) -14: 1111..1. .1..11......1... = (-14,0) ......1....1.... = (0,-14) -13: 1111..11 .1..11......11.. = (-13,0) ......1...1...1. = (0,-13) -12: 1111.1.. ........11...... = (-12,0) ......1...1..... = (0,-12) -11: 1111.1.1 ........11...1.. = (-11,0) ......1...11..1. = (0,-11) -10: 1111.11. ........11..1... = (-10,0) ......1...11.... = (0,-10) -9: 1111.111 ........11..11.. = (-9,0) .......1......1. = (0,-9) -8: 11111... ........1....... = (-8,0) .......1........ = (0,-8) -7: 11111..1 ........1....1.. = (-7,0) .......1...1..1. = (0,-7) -6: 11111.1. ........1...1... = (-6,0) .......1...1.... = (0,-6) -5: 11111.11 ........1...11.. = (-5,0) .......1..1...1. = (0,-5) -4: 111111.. .........1...... = (-4,0) .......1..1..... = (0,-4) -3: 111111.1 .........1...1.. = (-3,0) .......1..11..1. = (0,-3) -2: 1111111. .........1..1... = (-2,0) .......1..11.... = (0,-2) -1: 11111111 .........1..11.. = (-1,0) ..............1. = (0,-1) 0: ........ ................ = (0,0) ................ = (0,0) 1: .......1 .............1.. = (1,0) ...........1..1. = (0,1) 2: ......1. ............1... = (2,0) ...........1.... = (0,2) 3: ......11 ............11.. = (3,0) ..........1...1. = (0,3) 4: .....1.. .....1..11...... = (4,0) ..........1..... = (0,4) 5: .....1.1 .....1..11...1.. = (5,0) ..........11..1. = (0,5) 6: .....11. .....1..11..1... = (6,0) ..........11.... = (0,6) 7: .....111 .....1..11..11.. = (7,0) ...1..11......1. = (0,7) 8: ....1... .....1..1....... = (8,0) ...1..11........ = (0,8) 9: ....1..1 .....1..1....1.. = (9,0) ...1..11...1..1. = (0,9) 10: ....1.1. .....1..1...1... = (10,0) ...1..11...1.... = (0,10) 11: ....1.11 .....1..1...11.. = (11,0) ...1..11..1...1. = (0,11) 12: ....11.. .....1...1...... = (12,0) ...1..11..1..... = (0,12) 13: ....11.1 .....1...1...1.. = (13,0) ...1..11..11..1. = (0,13) 14: ....111. .....1...1..1... = (14,0) ...1..11..11.... = (0,14) 15: ....1111 .....1...1..11.. = (15,0) ...1..1.......1. = (0,15) 16: ...1.... .....1.......... = (16,0) ...1..1......... = (0,16) 17: ...1...1 .....1.......1.. = (17,0) ...1..1....1..1. = (0,17) 18: ...1..1. .....1......1... = (18,0) ...1..1....1.... = (0,18) 19: ...1..11 .....1......11.. = (19,0) ...1..1...1...1. = (0,19) 20: ...1.1.. ....1...11...... = (20,0) ...1..1...1..... = (0,20) 21: ...1.1.1 ....1...11...1.. = (21,0) ...1..1...11..1. = (0,21) 22: ...1.11. ....1...11..1... = (22,0) ...1..1...11.... = (0,22) 23: ...1.111 ....1...11..11.. = (23,0) ...1...1......1. = (0,23) 24: ...11... ....1...1....... = (24,0) ...1...1........ = (0,24) 25: ...11..1 ....1...1....1.. = (25,0) ...1...1...1..1. = (0,25) 26: ...11.1. ....1...1...1... = (26,0) ...1...1...1.... = (0,26) 27: ...11.11 ....1...1...11.. = (27,0) ...1...1..1...1. = (0,27) 28: ...111.. ....1....1...... = (28,0) ...1...1..1..... = (0,28) 29: ...111.1 ....1....1...1.. = (29,0) ...1...1..11..1. = (0,29) 30: ...1111. ....1....1..1... = (30,0) ...1...1..11.... = (0,30) 31: ...11111 ....1....1..11.. = (31,0) ...1..........1. = (0,31)