TI-84 Plus CE: Signal to Noise Ratio and Shannon’s Law
Signal to Noise Ratio (SNR)
The program SNR calculates the signal to noise ratio for inputs in one of the three units:
Decibels |
S – N |
Watts |
20 * log( S ÷ N ) |
Voltage |
10 * log(S ÷ N ) |
S: desired signal level
N: noise level
Cadence PCB Solutions (see source) provides a scale of signal to noise ratios and their effectiveness, which is summarized here:
5 dB to 10 dB |
No connection is made, the ratio is too low |
10 dB to 15 dB |
The connection is unreliable |
15 dB to 25 dB |
Minimum acceptable level |
25 dB to 40 dB |
Good connection |
41 dB and above |
Excellent connection |
In general, the higher the SNR, the better.
TI-84 TI-Basic Code: Signal to Noise Ratio
Program Title: SNR
Menu(“SIGNAL NOISE RATIO”,”DECIBELS”,1,”WATTS”,2,”VOLTAGE”,3)
Lbl 1
Input “SIGNAL DB? “, S
Input “NOISE DB? “, N
S – N → R
Goto 0
Lbl 2
Input “SIGNAL (W)? “, S
Input “NOISE (W)? “, N
20 * log(S / N) → R
Goto 0
Lbl 3
Input “SIGNAL (V)? “, S
Input “NOISE (W)? “, W
10 * log(S / N) → R
Goto 0
Lbl 0
Disp “SNR (DB): “, R
Examples
Example 1: S: -10 dB, N: -50 dB (from Source)
Results: 40 dB
Example 2: S: 400 W, N: 60 W
Results: 16.47817482 dB
Example 3: S: 300E-3 V (300 millivolts), N: 2E-6 V (2 microvolts)
Result: 51.76091259 dB (*source erroneously had 62 DB)
Shannon’s Law
The program SHANNON makes two calculations: signal to noise ratio in decibels and the capacity of the channel in bits per second. Shannon’s Law was discovered by Claude Shannon during World War II.
C = W * log(1 + S ÷ N) ÷ log(2)
W: bandwidth of the signal in Hertz
S: average signal received in Watts
N: average noise signal in Watts
C: maximum channel capacity in Bits per Second
TI-84 TI-Basic Code: Shannon’s Law
Program Title: SHANNON
Disp “SHANNON’S LAW”
Input “REC’D POWER (W)? “, S
Input “NOISE POWER (W)? “, N
Input “BANDWIDTH (HZ)? “, W
20 * log(S / N) → R
Disp “SIGNAL NOISE RATIO: “, R
W * log(1 + S / N) / log(2) → C
Disp “CHANNEL (BITS/S):”, C
Example
Inputs:
Average Received Signal Power (S): 49.2 W
Average Noise Power (N): 2.2 W
Bandwidth: 200 Hz
Results:
Signal Noise Ratio (SNR): 26.99084844 dB
Channel capacity: 909.2385861 bits/s
Source
Cadence. “What is Signal to Noise Ratio and How to calculate it?” Cadence PCB Solutions. 2020. Accessed November 30, 2025. https://resources.pcb.cadence.com/blog/2020-what-is-signal-to-noise-ratio-and-how-to-calculate-it
Eddie
All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.