I am attempting to diagram a simple approach to an equality testing circuit for two four-bit inputs. Instead of the wires being at an oblique angle to connect the two points of gate inputs and outputs, can I force the lines to be purely vertical and lateral with right angles as necessary to connect the points. I need to do this while maintaining the ability to label the wires as shown. When I first made the diagram, the wires were as I had hoped with the '-|' argument or operator in place of 'to', but I could not find a way to get wires instantiated with that method to accept labels. Thank you very much for your assistance and consideration.
\documentclass[12pt,letterpaper]{article}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz} \draw
(0,0) node[xor port] (g7) {$g_7$}
(0,2) node[xor port] (g6) {$g_6$}
(0,4) node[xor port] (g5) {$g_5$}
(0,6) node[xor port] (g4) {$g_4$}
(3,1) node[or port] (g3) {$g_3$}
(3,5) node[or port] (g2) {$g_2$}
(6,3) node[or port] (g1) {$g_1$}
(g4.out) to [short,l=${w_4}$] (g2.in 1)
(g5.out) to [short,l=${w_5}$] (g2.in 2)
(g6.out) to [short,l=${w_6}$] (g3.in 1)
(g7.out) to [short,l=${w_7}$] (g3.in 2)
(g2.out) to [short,l=${w_2}$] (g1.in 1)
(g3.out) to [short,l=${w_3}$] (g1.in 2)
(g1.out) node[anchor=west] {$output$}
(g4.in 1) node[anchor=east] {$a_3$}
(g4.in 2) node[anchor=east] {$b_3$}
(g5.in 1) node[anchor=east] {$a_2$}
(g5.in 2) node[anchor=east] {$b_2$}
(g6.in 1) node[anchor=east] {$a_1$}
(g6.in 2) node[anchor=east] {$b_1$}
(g7.in 1) node[anchor=east] {$a_0$}
(g7.in 2) node[anchor=east] {$b_0$}
;\end{circuitikz}
\end{document}