summaryrefslogtreecommitdiff
path: root/165/CH17/EX17.2/ex17_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '165/CH17/EX17.2/ex17_2.sce')
-rw-r--r--165/CH17/EX17.2/ex17_2.sce10
1 files changed, 10 insertions, 0 deletions
diff --git a/165/CH17/EX17.2/ex17_2.sce b/165/CH17/EX17.2/ex17_2.sce
new file mode 100644
index 000000000..71d2a5457
--- /dev/null
+++ b/165/CH17/EX17.2/ex17_2.sce
@@ -0,0 +1,10 @@
+//Example 17.2
+close;
+clc;
+n=5; //n bit resistive divider
+v=10; //in volts
+printf('\nOutput Voltage for the MSB = %.4f \n',v/2)
+printf('\nOutput Voltage for 2nd MSB = %.4f \n',v/4)
+printf('\nOutput Voltage for 3rd MSB = %.4f \n',v/8)
+printf('\nOutput Voltage for 4th MSB = %.4f \n',v/16)
+printf('\nOutput Voltage for 5th MSB = %.4f \n',v/32) \ No newline at end of file