The 38 does not allow the LED to have 100mA current. If we suppose the voltage across the LED to be about 2 volts (it is probably more) and the transistor saturation voltage to be 0.2 volts, then remains 5-2-0.2=2.8 V for 38 Ohms resistor. so it can pass 2.8/38=73.7 mA current at most.
The 38 does not allow the LED to have 100mA current. If we suppose the voltage across the LED to be about 2 volts (it is probably more) and the transistor saturation voltage to be 0.2 volts, then remains 5-2-0.2=2.8 V for 38 Ohms resistor. so it can pass 2.8/38=73.7 mA current at most.
Actually, the circuit is apply for IR transmitting and valid light LED.
I though Vdrop = Vcc - Vled = 5 - 1.2 = 3.8
then R=vdrop/Iled= 3.8 /100m =38 ohms?
Added after 6 minutes:
tajrin said:
like leotim said you have to reverse the connections of the LED for the circuit to work
to calculate R:
from your diagram
beta = 100
IC = Iled = 100mA
beta = Ic / Ib
to find R first we need to find Ib
Ib = Ic / beta
Ib = 100mA / 100 = 1mA
Usually Vbe of NPN = 0.65
so Vr = 5 - 0.65 = 4.35V
R = V / I = 4.35 / 1mA = 4350
By now, the LED current is limited by 38Ohms resistor (what ever R value be). so you should just choose an R value to turn the transistor ON. your AND gate may have an iutput curren limit. if so it is not needed to use any R, place a wire (short circuit) instead of R. If you prefer to use an R (to limit the AND gate output current) you can use simply a value much less that what tajrin have calculated (4350 Ohms), for example use a 1KOhms.