You just need to do a binary to 7 segment conversion.
Now depending on your the way you have the display attached to the microcontroller, you can either multiplex the displayed data, or display the whole thing at once.
Multiplexing the display allows you to use a minimum numbers of pins, 7 for the segments plus a few for the digits. The disadvantage is that at any given time only one digit must display data (only one digit is ON at any given time). by using a fast enough refresh rate, the human eye will see the whole display as ON.
Multiple sequence is like this:
- select digit 1 as ON, all others are off;
- put 7 segment data to the digit;
- wait a bit;
- select digit 2 as on, all others are off;
- put 7 segment data to the digit;
- wait a bit;
... until you have reached the last digit, then you go to digit 1 and repeat.
The refresh rate mus be high enough so that the human eye will not notice the flicker, say 60Hz or more. As an example for a 4 digit display and a refresh rate of 75Hz you get a digit_change_clock_rate of 300Hz, which means that at every 3.33 ms you will change to a new digit and display the required data on it.
Examples, with source code and a much better explanation, can be found on google, just search for "7 segment multiplex".
The other way to display the data is to tie each LED to a microcontroller pin, and power the digits all the time. This has the advantage of flicker free and high brightness display, but need lots of I/O and drains a lot of power.