Skip to main content
Commonmark migration
Source Link

#Bitxtreme, 0.25 bytes

Bitxtreme, 0.25 bytes

Binary representation:

00

From the documentation:

The first bit of each pair is a pointer to the memory position which holds the value to subtract from the accumulator. The result is stored in that same memory position pointed to by the operand. If the result is negative (the bits are in two's complement representation) then the second bit of the pair will be added to the current PC, modulo 2.

The program counter and accumulator are initialized to zero; then, the contents of memory location 0 are subtracted from the accumulator. This happens to be 0, leaving the accumulator at zero. Since there was no carry, the second bit is not added to the program counter.

The program counter is then incremented by 2 modulo 2, sending it back to the start, and causing an infinite loop. At each step, the special memory location 0 is modified, causing its contents (a 0) to be written to output.

It can be argued that this program should be scored as 1 byte, because the official interpreter in Python requires zero-padding. However, I don't think the zero-padding is really code.

#Bitxtreme, 0.25 bytes

Binary representation:

00

From the documentation:

The first bit of each pair is a pointer to the memory position which holds the value to subtract from the accumulator. The result is stored in that same memory position pointed to by the operand. If the result is negative (the bits are in two's complement representation) then the second bit of the pair will be added to the current PC, modulo 2.

The program counter and accumulator are initialized to zero; then, the contents of memory location 0 are subtracted from the accumulator. This happens to be 0, leaving the accumulator at zero. Since there was no carry, the second bit is not added to the program counter.

The program counter is then incremented by 2 modulo 2, sending it back to the start, and causing an infinite loop. At each step, the special memory location 0 is modified, causing its contents (a 0) to be written to output.

It can be argued that this program should be scored as 1 byte, because the official interpreter in Python requires zero-padding. However, I don't think the zero-padding is really code.

Bitxtreme, 0.25 bytes

Binary representation:

00

From the documentation:

The first bit of each pair is a pointer to the memory position which holds the value to subtract from the accumulator. The result is stored in that same memory position pointed to by the operand. If the result is negative (the bits are in two's complement representation) then the second bit of the pair will be added to the current PC, modulo 2.

The program counter and accumulator are initialized to zero; then, the contents of memory location 0 are subtracted from the accumulator. This happens to be 0, leaving the accumulator at zero. Since there was no carry, the second bit is not added to the program counter.

The program counter is then incremented by 2 modulo 2, sending it back to the start, and causing an infinite loop. At each step, the special memory location 0 is modified, causing its contents (a 0) to be written to output.

It can be argued that this program should be scored as 1 byte, because the official interpreter in Python requires zero-padding. However, I don't think the zero-padding is really code.

deleted 107 characters in body
Source Link
lirtosiast
  • 21.5k
  • 5
  • 52
  • 127

#Bitxtreme, 0.25 bytes

Binary representation:

00

From the documentation:

The first bit of each pair is a pointer to the memory position which holds the value to subtract from the accumulator. The result is stored in that same memory position pointed to by the operand. If the result is negative (the bits are in two's complement representation) then the second bit of the pair will be added to the current PC, modulo 2.

The program counter and accumulator are initialized to zero; then, the contents of memory location 0 are subtracted from the accumulator. This happens to be 0, leaving the accumulator at zero. Since there was no carry, the second bit is not added to the program counter.

The program counter is then incremented by 2 modulo 2, sending it back to the start, and causing an infinite loop. At each step, the special memory location 0 is modified, causing its contents (a 0) to be written to output.

It can be argued that this program should be scored as 1 byte, because the official interpreter in Python requires zero-padding. However, it would be easy to write an equally conforming interpreter on a machine with 2I don't think the zero-bit character sizes, whichpadding is why I've decided to count this as 0.25 bytesreally code.

#Bitxtreme, 0.25 bytes

Binary representation:

00

From the documentation:

The first bit of each pair is a pointer to the memory position which holds the value to subtract from the accumulator. The result is stored in that same memory position pointed to by the operand. If the result is negative (the bits are in two's complement representation) then the second bit of the pair will be added to the current PC, modulo 2.

The program counter and accumulator are initialized to zero; then, the contents of memory location 0 are subtracted from the accumulator. This happens to be 0, leaving the accumulator at zero. Since there was no carry, the second bit is not added to the program counter.

The program counter is then incremented by 2 modulo 2, sending it back to the start, and causing an infinite loop. At each step, the special memory location 0 is modified, causing its contents (a 0) to be written to output.

It can be argued that this program should be scored as 1 byte, because the official interpreter in Python requires zero-padding. However, it would be easy to write an equally conforming interpreter on a machine with 2-bit character sizes, which is why I've decided to count this as 0.25 bytes.

#Bitxtreme, 0.25 bytes

Binary representation:

00

From the documentation:

The first bit of each pair is a pointer to the memory position which holds the value to subtract from the accumulator. The result is stored in that same memory position pointed to by the operand. If the result is negative (the bits are in two's complement representation) then the second bit of the pair will be added to the current PC, modulo 2.

The program counter and accumulator are initialized to zero; then, the contents of memory location 0 are subtracted from the accumulator. This happens to be 0, leaving the accumulator at zero. Since there was no carry, the second bit is not added to the program counter.

The program counter is then incremented by 2 modulo 2, sending it back to the start, and causing an infinite loop. At each step, the special memory location 0 is modified, causing its contents (a 0) to be written to output.

It can be argued that this program should be scored as 1 byte, because the official interpreter in Python requires zero-padding. However, I don't think the zero-padding is really code.

Source Link
lirtosiast
  • 21.5k
  • 5
  • 52
  • 127

#Bitxtreme, 0.25 bytes

Binary representation:

00

From the documentation:

The first bit of each pair is a pointer to the memory position which holds the value to subtract from the accumulator. The result is stored in that same memory position pointed to by the operand. If the result is negative (the bits are in two's complement representation) then the second bit of the pair will be added to the current PC, modulo 2.

The program counter and accumulator are initialized to zero; then, the contents of memory location 0 are subtracted from the accumulator. This happens to be 0, leaving the accumulator at zero. Since there was no carry, the second bit is not added to the program counter.

The program counter is then incremented by 2 modulo 2, sending it back to the start, and causing an infinite loop. At each step, the special memory location 0 is modified, causing its contents (a 0) to be written to output.

It can be argued that this program should be scored as 1 byte, because the official interpreter in Python requires zero-padding. However, it would be easy to write an equally conforming interpreter on a machine with 2-bit character sizes, which is why I've decided to count this as 0.25 bytes.