Because binary digits (or bits) can be put together to represent any number, you can assemble several bits of memory (D flip-flops) to make a "Register" which holds any number up to some useful value. I this case, we are putting 4 together to make a "nibble" of memory, enough to hold one hexadecimal digit; 0-9 and A-F.
Notice that no matter what you do with the input, the output doesn't change until you press the button.
T-Flip Flop or Binary and Decimal Numbers
See also: