summaryrefslogtreecommitdiff
path: root/1238/CH8/EX8.11/8_11.sce
blob: d5ab675a900f7015dfb3a3f62616916b4bdcf978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//calculating output voltages//
//example 11//
clc
//clears the command window//
clear
//clears// 
V=10;//high input voltage//
VMSB=V/2;//output caused by MSB//
VMSB2=V/4;//output caused by second MSB//
VMSB3=V/8;//output caused by third MSB//
VMSB4=V/16;//output caused by fourth MSB//
VMSB5=V/32;//output caused by fifth MSB//
VMSB6=V/64;//output caused by sixth MSB//
printf('output caused by MSB=%f volt\n',VMSB)
printf('output caused by second MSB=%f volt\n',VMSB2)
printf('output caused by third MSB=%f volt\n',VMSB3)
printf('output caused by fourth MSB=%f volt\n',VMSB4)
printf('output caused by fifth MSB=%f volt\n',VMSB5)
printf('output caused by sixth MSB=%f volt\n',VMSB6)
//displaying the results//