There is a big difference between decimal data and ASCII representation of decimal data. Don't confuse them.

The binary number 0000000011111111 is stored as 8 "zeroes" followed by 8 "ones" (they are in quotes, because the hardware uses voltages for this, but for us they are bits). The decimal number 255 is stored in the computer as 0000000011111111. That's because 255 is just a representation for us humans.

If a program needs to print the number 0000000011111111 in decimal it has to do so decimal digit by decimal digit. You can get to the last decimal digit by dividing the number to 1010 (10 in decimal) and getting the remainder. This remainder is a decimal digit, that is a number between 0 and 9 inclusive. The ASCII codes for the *characters* from '0' to '9' are helpfully put one after the other, so all you need to do to get the ASCII code is to add some fixed number to the one you already have. This number is of course the ASCII code of the character '0', or 48 in decimal.

OK, so we got the character representation of the last decimal digit. But how can we get the others? Well, if you use integer division and divide 0000000011111111 by 1010 (the same numbers as before), you'll end up with 0000000000011001 which is just 25 in decimal. So in effect using the integer division and remainder, you can split the last digit from the number. In decimal this will look like this:

255 % 10 = 5 // This is the last digit as a decimal number. The value in binary will be 101.
255 / 10 = 25

Now you can use the same trick to "peal off" the last digit of 25. You stop when the number you need to represent is a single digit one.

Note that this works for non-negative numbers. For negative ones you first negate them thus getting their opposite positive number and add the minus sign to the front of the ASCII representation. This algorithm is also described in the book, in the String.setInt section.

BCD is a system used mainly in mainframes by IBM, DEC and others. It's not used by modern computers, although the x86 architecture supports it.