
\usepackage{booktabs}

\begin{table}[h!]
  \begin{center}
    \caption{全加器真值表}
    \begin{tabular}{c|c|c|c|c}
      \toprule
      A & B & $C_{in}$ & $C_{out}$ & S \\
      \midrule
      0 & 0 & 0 & 0 & 0 \\
      1 & 0 & 0 & 0 & 1 \\
      0 & 1 & 0 & 0 & 1 \\
      1 & 1 & 0 & 1 & 0 \\
      0 & 0 & 1 & 0 & 1 \\
      1 & 0 & 1 & 1 & 0 \\
      0 & 1 & 1 & 1 & 0 \\
      1 & 1 & 1 & 1 & 1 \\
      0 & 0 & 0 & 0 & 0 \\
      \bottomrule
    \end{tabular}
  \end{center}
\end{table}
