Normally this happens mathematically at hardware level to convert the binary number to an string or by an callable software function already made for the programmer to call in their programming language.