user6235: im using arduino and im out of pins.
I need something like a decoder but the problem is that the decoders only change one output pin I.E. for 0011 the output will be 0001000000000000 what i need is to have the first outputs on I.E for 1000 the output will be 111111111000000000 i basically need to light up to 16leds and im out of pins so i was wondering is there is any IC that does this for me if i have 1111 it will output 16 ones.

user337: You could use the MCP23017 an i2c 16 input/output port expander. (datasheet)
It allows you to control 16 I/O pins via a simple I2C interface (only 2 pins needed).  And an Arduino library exists for it.

user84: You can use one (or more, daisy-chained) shift register for that. 
It will normally take you 3 pins and provide 8 outputs, or 8n where n is the number of chained shift registers still using only 3 Arduino pins. 
One example of a shift register that fits your situation is the 74HC595.
On Arduino, you can use shiftOut function to help handle those ICs.

6235: <p>im using arduino and im out of pins.</p>

<p>I need something like a decoder but the problem is that the decoders only change one output pin I.E. for 0011 the output will be 0001000000000000 what i need is to have the first outputs on I.E for 1000 the output will be 111111111000000000 i basically need to light up to 16leds and im out of pins so i was wondering is there is any IC that does this for me if i have 1111 it will output 16 ones.</p>
 337: <p>You could use the MCP23017 an i2c 16 input/output port expander. (<a href="http://www.adafruit.com/datasheets/mcp23017.pdf" rel="nofollow">datasheet</a>)</p>

<p>It allows you to control 16 I/O pins via a simple I2C interface (only 2 pins needed).  And an <a href="https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library" rel="nofollow">Arduino library</a> exists for it.</p>
 84: <p>You can use one (or more, daisy-chained) <strong>shift register</strong> for that. </p>

<p>It will normally take you 3 pins and provide 8 outputs, or 8n where n is the number of chained shift registers still using only 3 Arduino pins. </p>

<p>One example of a shift register that fits your situation is the <strong>74HC595</strong>.</p>

<p>On Arduino, you can use <code>shiftOut</code> function to help handle those ICs.</p>
