Voltage supply for an IC circuit
Since you have planned to use battery as a power source with Logic gates, it is better to use low quiescent current regulators than 7805. Because 7805 is old one. There are new and upgraded regulators for low quiescent current applications.
With that in mind, you can use MCP1702 series regulator for your project. The main objective here is you are using battery. So, the current consumption from the battery should be less in order to extend the life of battery whether it is 9V or AAA batteries.
So, I suggest this IC for you. The delivering current of MCP1702 is more than enough for Logic gates ICs. More info you can found in it's data sheet.
Circuit is so simple as you might have seen in 7805 circuit.
Data sheet : https://www.microchip.com/wwwproducts/en/en028178