Digital ANDing two signals

I have a ARDUINO Uno. I have a PWM signal coming out of pin 9 and and on off signal out put coming from pin 10 1 sec on 1 sec off.
I have used an AND chip (74hc00) to AND the two signals to gether so I get a PWM signal for 1 sec then 0V for 1 sec and so on.
Is there a way to do this in software and get rid of the AND gate?

I'd try a blink without delay approach, where instead of turning the led on or off with digitalWrite(), do that with analogWrite(). Then I think you would get the modulated signal you're looking for.

Off the top my head....

The demo Several Things at a Time is an extended example of BWoD and illustrates the use of millis() to manage timing without blocking. It may help with understanding the technique.

Have a look at Using millis() for timing. A beginners guide if you need more explanation.

...R