Linked Questions

548 votes
240 answers

Showcase of Languages

Notes This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not ...
230 votes
343 answers

Is this number a prime?

Believe it or not, we do not yet have a code golf challenge for a simple primality test. While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in ...
  • 208k
66 votes
231 answers

Add two numbers

Input: Two integers. Preferably decimal integers, but other forms of numbers can be used. These can be given to the code in standard input, as arguments to the program or function, or as a list. ...
  • 6,266
46 votes
76 answers

Is it a leap year?

This challenge is quite simple. You will take an input which will be a year from 1801 to 2400, and output if it is a leap year or not. Your input will have no newlines or trailing spaces: ...
user avatar
20 votes
35 answers

Generate a Universal-binary-function Lookup Table

This is tangentially related to my quest to invent an esoteric programming language. A table of the binary numbers 0 .. 15 can be used to implement a Universal Binary Function using indexing ...
  • 4,887
46 votes
11 answers

Run Stackylogic

Stackylogic is a logic-based programming language I made up that take in 0's and 1's for input and outputs a single ...
17 votes
21 answers

Generate a 6 character string from a 15 character alphabet

In one of our projects at work, we recently discovered a particularly large method for generating a 6 character string from a 15 character alphabet. A few of us claimed "I bet we can get that in one ...
23 votes
2 answers

Build a multiplying machine using NAND logic gates

Based on my previous question of the same type, Build an adding machine using NAND logic gates, this time you're being asked to multiply instead of add. Build a diagram of (two-wire) NAND logic gates ...
  • 34.3k
36 votes
1 answer

Domino Circuits

Scoreboard Here are the raw scores (i.e. domino counts) for VisualMelon's submission. I'll turn these into the normalised scores described below, when more answers come in. The existing solution can ...
9 votes
3 answers

Build a 2-way universal logic processor using NAND logic gates

A 2-way universal logic processor (2ULP) is a network of logic gates that takes two input wires A and B, as well as four other ...
  • 34.3k
12 votes
2 answers

Build a bit-counting comparator using NAND logic gates

A bit-counting comparator (BCC) is a logic circuit that takes some number of counting inputs A1, A2, A3, ..., An as well as inputs ...
  • 34.3k
10 votes
2 answers

Build an EBCDIC converter using NAND logic gates

In this question, a mapping is defined between EBCDIC and a superset of ISO-8859-1. Your task is to build a network of two-input NAND gates that will take eight inputs ...
  • 34.3k
16 votes
1 answer

Build a minifloat adding machine using NAND logic gates

A minifloat is a binary representation of a floating-point number that has very few bits. The minifloat in this question will be defined as an 6-bit number m, ...
  • 34.3k
8 votes
1 answer

Build an adding machine using NAND logic gates

This is "programming" at its most fundamental. Build a diagram of (two-wire) NAND logic gates that will take the input wires A1, ...
  • 34.3k
10 votes
4 answers

X marks the spot – a print job

Given two numbers, print a page with an "X" in the specified location (±10%). The numbers must be either percentages or fractions of the page's print area dimensions, e.g. ...
  • 29.2k