7-segment display with decoder
What you need is what's called a "BCD t0 7 segment decoder", which isn't what you've shown. Neither is the display you've shown a 7 segment display, since it only has 7 pins. Also, if you want to display more than one digit, you'll need as many decoders as you have digits and a means to drive each the inputs separately, or a multiplexing/latching/shift register scheme of some kind. Study this data sheet for a clue.