$BBh(B 8 $B2s(B $B7+$jJV$7!"G[Ns(B

$BK\F|$NFbMF(B


8-1. $BA02s$NI|=,(B---$BFs

$BH=JL<0(B D=b*b-4*a*c $B$,(B 0 $B$h$jBg$-$$>l9g(B
$B2r$OFs$D$N -b + $B"e(BD x1 = ---------- 2a -b - $B"e(BD x2 = ---------- 2a

2x2-5x-3=0 $B$N2r$O(B D=(-5)2-4*2*(-3)=1 $B$h$j!"(B

     5+$B"e(B1
x = ---------
      2*2

      5+1
  = -------
       4

       3
  =  ----
       2

$B$^$?$O(B
     5-$B"e(B1
x = -------
     2*2

      5-1
  = -------
       4

  = 1
D=0 $B$N;~(B
$B2r$O0l$D$N -b x = ---- 2a

$BNc$($P(B x2+2x+1=0 $B$N2r$O(B D=22-4*1*1=0 $B$h$j!"(B

   -2$B!^"e(B0
x= ---------
    2*1

     -2
  = ----
      2
             
  =  -1
D $B$,Ii$N>l9g(B
$B2r$OFs$D$H$bJ#AG?t$K$J$j$^$9!#"e(BD $B$,5u?t$K$J$k$N$G!"$l -b $B

$BNc$($P(B x2-2x+5=0 $B$N2r$O(B D=(-2)2-4*1*5=-16 $B$h$j!"(B

     2 + $B"e(B(-16)
x = ------------
      2*1
     2 $B!^(B 4$B"e(B-1
  = ------------
         2
             
  =  1 $B!^(B 2i

C$B8@8l$G$OJ#AG?t$r$=$N$^$^$G$O07$($J$$$N$G!"$l5a$a$F$+$i!"!V

8-2. Circuit Maker

$BEE5$2sO)(B

$B1i=,(B8-1

$B $B%R%s%H(B
  1. $B!V(BDevices$B"*(BBrowse... x$B!W(B $B$GItIJ$N0lMw$rI=<($9$k2hLL$K$7!"(B Major Device Class $B$+$i(B Resistors $B$rA*Br$7$^$9!#(B Minor Device Class $B$+$i(B Resistors $B$rA*Br$7$^$9!#(B Device Symbol $B$+$i(B Resistor $B$rA*Br$7$^$9!#(B ($B0J8e!"$3$NA`:n$r(B Major Device Class, Minor Device Class, Device Symbol $B$N=g$K(B (Resistors, Resistors, Resistor)$B$H=q$-$^$9(B)
    $BItIJ$NA*Br2hLL(B

    $B!V(BPlace$B!W%\%?%s$r2!$9$H!":n6HNN0h$K2hLL$,@Z$jBX$o$j$^$9!#(B $BGr$$2hLL$NCf1{IU6a$r:8%/%j%C%/$9$k$H!"Dq93$rI=$95-9f$,I=<($5$l$^$9!#(B

    $BDq93(B

    $BDq93$N5-9f$r;X$7$F1&%/%j%C%/$7$F!V(BDuplicate$B!W$rA*Br$9$k!#(B $B$=$7$F9g7W(B 3 $BK\$NDq93$rG[CV$7$^$9!#(B $BDq935-9f$r1&%/%j%C%/$7$F!V(BEdit Device Data$B!W$rA*$S$^$9!#(B $B!V(BLabel-Value$B!W$H$$$&Ms$,Dq93CM$rI=$7$^$9$N$G!"$3$3$GDq93CM$r;XDj$7$^(B $B$9!#(B

  2. $BItIJI=$+$i(B (Analog, Instruments, Multimeter) $B$rA*$S(B $B!V(BPlace$B!W%\(B $B%?%s$rA*$SE,Ev$J0LCV$G:8%/%j%C%/$7$^$9!#(B $B$9$k$H!"%a!<%?$N
    $B%a!<%?A*Br?^(B
  3. $B%7%_%e%l!<%7%g%s$NET9g>e!"4p=`$H$J$k(B 0 V $B$NE@$,I,MW$J$N$G!"(B(Analog, Power, Ground) $B$rG[CV$7$^$9!#(B
  4. $B!V(BOptions$B"*(BArrow/Wire$B!W$rA*$S!"ItIJ$NC $B40@.?^(B
  5. $B!V(BSimulation$B!W$r2!$7$F!"(B $B!V(BAnalog Mode$B!W$HI=<($5$l$F$$$k$3$H$r3NG'$7$^$9!#(B $B$b$7!"!V(BDigital Mode$B!W$,I=<($5$l$F$$$k;~$O!"$3$N!V(BDigital Mode$B!W$rA*Br(B $B$9$k$H!V(BAnalog Mode$B!W$K$J$j$^$9!#(B
  6. $B!V(BSimulation $B"*(B Run$B!W$rA*[email protected]$,I=<($5$l$^$9!#(B

$B1i=,(B8-2

$B2<$N2sO)?^$G(B1$B&8$NDq93$rN.$l$kEEN.$NBg$-$5$r5a$a$J$5$$!#(B

$B%R%s%H(B

$BEECS$O(B(Anarog, Power, Battery)$B!#(B $BEEN.$rB,Dj$9$k$K$O%^%k%A%a!<%?$G(B current $B$r;XDj$7$^$9!#(B $B40@.?^$O


$BEE;R2sO)(B

$B1i=,(B8-3

$B2<$N2sO)?^$G!"(BA $BE@$H(B B $BE@$NEE05$rD4$Y!"A}I}N($r5a$a$J$5$$!#(B

$B%R%s%H(B
  1. $BItIJ$rG[CV$7$F2sO)?^$r:n@.$7$^$9!#(B $B%H%i%s%8%9%?$O(B(Transistors, BJTs, NPN TransB) $B$rA*$S!"2<$N%b%G%kA*Br2h(B $BLL$+$i!V(B2N2222A$B!W$rA*$S$^$9!#(B

    1kHz $B$rF~NO$9$k$K$O!"(B(Analog, Instruments, Signal Gen) $B$rA*$S$^$9!#(B $BEE05$NI}$rF~NO$9$k$K$O!"(BSignal Gen $B$N5-9f$r1&%/%j%C%/$7!"!V(BEdit Signal Generator$B!W$rA*$S$^$9!#$=$7$F!"!V(BPeak Amplitude$B!W$NMs$K(B 100mV $B$rF~NO$7$^$9!#(B

  2. $B!V(BSimulation $B"*(B Run$B!W$rA*$S!"%7%_%e%l!<%7%g%s$r3+;O$7$^$9!#(B
  3. $BEE05$rB,$j$?$$E@$r:8%/%j%C%/$9$k$H!"2hLL2<$K4QB,$5$l$?CM$,%0%i%U$G(B $BI=<($5$l$^$9!#(B $BJL$NE@$r!V(BShift$B!W%-!<$r2!$7$J$,$i:8%/%j%C%/$9$k$H!"%0%i%U$,=E$J$C$FI=(B $B<($5$l$^$9!#(B
  4. $B%0%i%U$N1&B&$K%+!<%=%k$,$"$j$^$9$N$G!"$=$l$r0\F0$7$F%0%i%U$NCM$rFI$_$H(B $B$j!"=PNOEE0L:9$r7WB,$7$^$9!#(B

$B1i=,(B8-4

$B2<$N2sO)?^$G!"(BA $BE@$H(B B $BE@$NEE05$rD4$Y!"A}I}N($r5a$a$J$5$$!#(B


$B;29MJ88%(B

$BNkLZ2m?C!V

$B%G%#%8%?%k2sO)(B

$B1i=,(B8-5

$BFs?J?t0l7e(B($B$D$^$j(B 0 $B$+(B 1)$B$rFs$DF~NO$7$F!"B-$7;;$r

xyz1z0
0000
0101
1001
1110
$B%R%s%H(B
  1. $BH>2C;;4o$N2sO)$O
  2. (Digital, Gates, 2-In AND) $B$H(B (Digital, Gates, 2-In XOR) $B$rG[CV$7$^$9!#(B $B=PNO$K(B (Digital Animated, Displays, Logic Display) $B$rFs$D!"F~NOMQ$K(B (Digital, Power, Logic Switch) $B$rFs$DG[CV$7$^$9!#(B
  3. $B2sO)$rG[@~$7$^$9!#40@.?^$O
  4. $B!V(BSimulation$B!W$r2!$7$F!"(B $B!V(BDigital Mode$B!W$HI=<($5$l$F$$$k$3$H$r3NG'$7$^$9!#(B $B$b$7!"!V(BAnalog Mode$B!W$,I=<($5$l$F$$$k;~$O!"$3$N!V(BAnalog Mode$B!W$rA*Br(B $B$9$k$H!V(BDigital Mode$B!W$K$J$j$^$9!#(B
  5. $B!V(BSimulation $B"*(B Run$B!W$rA*$S$^$9!#(B $B%9%$%C%A$rF~$j@Z$j$9$k$H!"$=$l$K1~$8$F%9%$%C%A$NCM$NOB$KBP1~$9$k%i%s%W(B $B$,8w$j$^$9!#(B

$B1i=,(B8-6

$B0J2<$K<($9A42C;;4o$rMxMQ$7$F!"Fs?J?tFs7e$rFs$DF~NO$9$kB-$7;;2sO)$r:n$j(B $B$J$5$$!#(B $BA42C;;4o$H$O(B 3 $B$D$N0l7e$NFs?J?t$NF~NO$NOB$rFs7e$NFs?J?t$H$7$F=PNO$9$k(B $B$b$N$G$"$k!#(B

$B%R%s%H(B
  1. $BI.;;$HF1$8MWNN$G2<$N7e$+$i=g$KB-$7$F$$$/!#$=$N;~7+$j>e$,$j$N=hM}$b(B $B$9$k!#(B $B$D$^$j!" $BB-$7;;4o$N35G0?^(B
  2. $B:G2<0L7e$OH>2C;;4o$G7W;;$9$k!#$"$H$O2<$N7e$N7+$j>e$,$j$H!"$=$N7e$N(B $BFs$D$N?t$N9g$o$;$F;0$D$N?t$NB-$7;;$rA42C;;4o$G9T$&!#(B
  3. $BI=<($K(B Logic Display $B$r;H$&Be$o$j$K!"(B (Digital Animated, Displays, Hex Display) $B$r;HMQ$7$F$bNI$$!#(B

8-3. $BA22=<0$H7+$jJV$7(B

$BA22=<0(B

$B?t3X$G$O!"?t$NNs$KBP$7$F!"E:;z$KHV9f$r$D$1$?J8;z$r3d$jEv$F$^$9!#(B $BNc(B

a0=0,
a1=1, 
a2=2, 
a3=3, 
a4=4, 
a5=5,
...

$B$3$l$KBP$7$F!"(B0 $BHVL\$NCM!"(B 1 $BHVL\$NCM$H!"A4$F$NCM$r6qBNE*$K;XDj$;$:!"(B i$BHVL\$NCM$r(B i $B$r;HMQ$7$FI=$9$3$H$,$"$j$^$9!#(B $B$3$N$h$&$JI=$7J}$r(B$B0lHL9`(B$B$H8@$$$^$9!#(B $B>e$NNc$@$H!"0lHL9`$O(Bai=i $B$H$J$j$^$9!#(B

$B1i=,(B8-7

$B

  1. b0=2, b1=4, b2=6, b3=8, b4=10, ...
  2. c0=1, c1=3, c2=5, c3=7, c4=9, ...
  3. d0=10, d1=9, d2=8, d3=7, d4=6, ...

$B?tNs$NJL$NDj5A$H$7$F!"(B $B!V(Ba0$B$NCM!W$H!"(B $B!V(Bai+1$B$NCM$r(B ai$B$r;H$C$?<0!W$GDj5A$9$k$H$$$&J}K!$,$"(B $B$j$^$9!#(B $B$3$N<0$r(B$BA22=<0(B$B$H8@$$$^$9!#(B $B$^$?!"A22=<0$+$i0lHL9`$r5a$a$k$3$H$r!VA22=<0$r2r$/!W$H8@$$$^$9!#(B

$BNc(B:
  a0=0
  ai+1=ai+1

$B$3$N>l9g!"$3$NA22=<0$r2r$/$H(B ai=i $B$H$J$j$^$9!#(B $B$J$*!"(B $B%W%m%0%i%_%s%0$G$O5U$K0lHL9`$+$iA22=<0$rF3$/$3$H$r$9$k$3$H$,$"$j(B $B$^$9!#(B

$B1i=,(B8-8

$B

  1.   a0=2
      ai+1=ai+2
    
  2.   a0=1
      ai+1=ai+2
    
  3.   a0=10
      ai+1=ai-1
    
  4.   a0=1
      ai+1=ai$B!_(B2
    

$B1i=,(B8-9

$B

  1. b0=2, b1=4, b2=6, b3=8, b4=10, ...
  2. c0=1, c1=3, c2=5, c3=7, c4=9, ...
  3. d0=10, d1=9, d2=8, d3=7, d4=6, ...

a0+ a1+ ...+ an-1 $B$r

n-1
 $B&2(B ai
i=0

$B&2$NCf$K$O0lHL9`$r=q$-!"2<$K$OE:;z$N;O$a$NCM!">e$K$O:G8e$NCM$r=q$-$^$9!#(B $BNc$($P(B 1 + 3 + 5 + ... + 99 $B$O

 49
 $B&2(B (2i+1)
i=0

$BC"$7!"(B($BE:;z!"3+;O;~$NCM!"=*N;;~$NCM(B)$B$,(B(i,1,n)$B$J(B $B$IL@$i$+$J;~!"(B$B&2(B ai $B$J$I$H>J(B $BN,$7$F=q$/>l9g$,$"$j$^$9!#(B $B$^$?

n+1
 $B&2(B ai = a0+a1+...+an+an+1
i=0

         n
       = $B&2(B ai + an+1
        i=0

$B$D$^$j!"Bh(B n $B9`$^$G$NOB$r(B Sn $B$GI=$9$H

S0  = a0
Sn+1 = Sn+an+1

$B7+$jJV$7(B

C $B8@8l$G$b$C$H$b4pK\E*$J7+$jJV$7J8$O(B while $BJ8$G$9!#(B while $BJ8$O

while($B>r7o<0(B){
  $B7+$jJV$7J8(B
}

$B>r7o<0$,@5$7$$8B$j7+JV$7J8$rr7o<0$,@.N)$7$J$1$l$P7+JV$7J8$O0l2s$br7o<0$,@.N)$9$k$H7+JV$7J8$,r7o(B $B<0$,JQ$o$i$J$$$H1J1s$K7+$jJV$7$,5/$-$F$7$^$$$^$9!#(B $B7+$jJV$7$N4pK\E*$J%F%/%K%C%/$H$7$F!"

  1. $B>r7o<0$NCf$K8=$l$k!#(B
  2. $B7+JV$7J8$NCf$GCM$,JQ99$5$l$k!#(B

$B$3$N$h$&$JJQ?t$N$3$H$r(B$B%k!<%WJQ?t(B$B$H8@$$$^$9!#(B

$B1i=,(B8-10

$B

#include <stdio.h>
main(){
  int a;
  a=0;
  while(a<5){
    printf("$B!{(B");
    a=a+1;
  }
  printf("\n");
}

$B!V(Ba=a+1$B!W$H$$$&5-K!$O!"!Vi+1=ai+1 $B$HF1$8Lr3d$K$J$j$^$9!#(B $B;O$a$K!V(Ba=0$B!W$H$7$F$*$$$F!"!V(Ba=a+1$B!W$r7+$jJV$9$H!"!V(Ba=a+1$B!W$r7+$jJV$7$?2s?t(B $B$@$1(B a $B$,A}$($F$$$-$^$9!#7+$jJV$72s?t$r(B i $B$H$9$k$H!"(B a $B$NCM$O(B i $B$K$J$j$^$9!#(B

$B1i=,(B8-11

$B2<$N%W%m%0%i%`$rAv$i$;$J$5$$!#(B $B$^$?!"1i=,(B8-9$B$NEz$($r;29M$K$7$F!"$3$N%W%m%0%i%`$r2~B$$7!"%k!<%WJQ(B $B?t$NCM$,0J2<$N$h$&$K$J$k$h$&$K$7$J$5$$!#(B

  1. 1, 3, 5, 7, 9
  2. 10, 9, 8, 7, 6
#include <stdio.h>
main(){
  int b;
  b=2;
  while(b<=10){
    printf("$B%k!<%WJQ?t(B = %d\n",b);
    b=b+2;
  }
}

$B0lJ}!"%k!<%WJQ?t$r;HMQ$7$F?tNs$N0lHL9`$r=q$/$H!"?tNs$rI=<($9$k$3(B $B$H$,$G$-$^$9!#(B

$B1i=,(B8-12

$B2<$N%W%m%0%i%`$rAv$i$;$J$5$$!#(B $B$^$?!"$3$N%W%m%0%i%`$r2~B$$7$F!"M5$N$"$k(B $B?M$O:G8e$N%+%s%^!V(B,$B!W$,=P$J$$$h$&$K$7$J$5$$(B)$B!#(B

  1. 1, 3, 5, 7, 9, ... 19
  2. 10, 9, 8, ... , -10
  3. 1, 2, 4, 8, 16, ... 1024
#include <stdio.h>
main(){
  int i,b;
  i=0;
  while(i<10){
    b=2*(i+1);
    printf("%d, ",b);
    i=i+1;
  }
  printf("\n");
}

$B1i=,(B8-13

$B0J2<$N;03Q4X?t$NI=$r=PNO$9$k%W%m%0%i%`$r40@.$5$;$J$5$$!#(B

#include <stdio.h>
#include <math.h>
main(){
  int i;
  float x,y;
  i=0;
  while(i<20){
    x = /* x $B$NCM$O(B 0 $B$+$i(B 2$B&P$N4V(B $B$r$H$k$h$&$K$9$k!#(B */
    y = /* sin x $B$NCM$rF~$l$k(B */
    printf("x=%f, sin(x)=%f\n",x,y)
    /* i $B$NCM$r99?7$9$k(B */
  }
}

$B1i=,(B8-14

$B%U%#%\%J%C%A?tNs$r(B(20$B8D(B)$BI=<($9$k%W%m%0%i%`$r=q$-$J$5$$!#(B $BC"$7!"%U%#%\%J%C%A?tNs$H$O

1, 1, 2, 3, 5, 8, 13, 21, 34, 53, ...

a0=1
a1=1
ai=ai-1+ai-2 (i$B!f(B2)

$B1i=,(B8-15

$B2hLL$K$D$.$N$h$&$J%Q%?!<%s$r=PNO$9$k%W%m%0%i%`$r:n$j$J$5$$!#(B

$B!|(B
$B!|!|(B
$B!|!|!|(B
$B!|!|!|!|(B
$B!|!|!|!|!|(B
$B!|!|!|!|!|!|(B

8-4. $BG[Ns(B

$B@k8@J8$G$N=i4|2=(B

C $B8@8l$G$O@k8@J8$GJQ?t$NCM$rBeF~(B($B=i4|2=(B)$B$G$-$^$9!#(B

int i=0;
float a=2.3;
char d='F';

$BG[Ns(B

C $B8@8l$G?tNs$r$BG[Ns(B$B$H$$$&35G0$,MQ0U$5$l$F$$$^$9!#(B $BE:;z$O3Q3g8L!V(B[ ]$B!W$G3g$j$^$9!#(B $B$D$^$j!"(Ba0, a1, a2 $B$O$=$l$>$l(B a[0], a[1], a[2] $B$HI=$7$^$9!#(B ai$B$O(B a[i] $B$HI=$7$^$9!#(B $B$?$@$7!"E:;z$K;HMQ$G$-$kJQ?t$O(B$B@0?t7?(B(int)$B$@$1$G$9!#(B $B$5$i$KE:;z$K$O(B a[i+1] $B$d(B b[j*2] $B$J$I!"@0?t$rCM$K;}$D<0$r=q$/$3$H$,$G$-$^$9!#(B

$BG[Ns$r;H$&;~!"@k8@$O

int a[5];
char b[3];
float c[4];

$B$9$k$H$=$l$>$l!"

a[0], a[1], a[2], a[3], a[4]
b[0], b[1], b[2]
c[0], c[1], c[2], c[3]

$B%W%m%0%i%`$G$O!"G[Ns$O$=$l$>$lIaDL$NJQ?t$H$7$F;HMQ$9$k$3$H$,$G$-$^$9!#(B $BC"$7!"

int a[5]={ 3, 4, 6, 0, -1 };

$B$3$N$h$&$K$9$k$H(B $B

a[0]= 3,
a[1]= 4,
a[2]= 6,
a[3]= 0,
a[4]=-1

$B$5$i$KCM$r$^$H$a$F%;%C%H$9$k>l9g!"MWAG?t$N;XDj$r>JN,$9$k$3$H$,$G$-$^$9!#(B

float b[]={ 1.3, -3e-2, -5.0 };

$B$3$N$h$&$K$9$k$H

b[0]= 1.3,
b[1]=-3e-2,
b[2]=-5.0

$B1i=,(B8-16

$B#define X Y $B$O%W%m%0%i%`Cf$G(B Y $B$r(B X $B$H$$$&(B $BL>A0$G;H$&$3$H$r0UL#$9$k(B)$B!#(B

#include <stdio.h>
#define N 5
main(){
  int i;
  float a[N]={2.3, 4.4, 3.9, -1.2, 0.3};
  float s;
  i=0;
  s=0;
  while(i<N){
    printf("a[%1d]=%f\n",i,a[i]);
    /* s $B$K(B a[i] $B$r2C$($k(B */
  }
  printf("$B9g7W(B: %f\n",s);
}

$B1i=,(B8-17

$B0J2<$N?t$NI8=`JP:9$r5a$a$J$5$$!#(B $BC"$7I8=`JP:9$O

$BI8=`JP:9(B = $B"eJ,;6(B

       $B&2(B($BAGE@(B - $BJ?6Q(B)2
$BJ,;6(B = ----------------
               n
3.5, 2.0, 5.5, 2.3
$B%R%s%H(B

$BJ,;6$O


       $B&2(B($BAGE@(B - $BJ?6Q(B)2
$BJ,;6(B = ----------------
               n

        $B&2(B(($BAGE@(B)2 - 2$B!_AGE@!_J?6Q(B + ($BJ?6Q(B)2)
     = -----------------------------------
                      n

        $B&2(B($BAGE@(B)2            $B&2AGE@(B             $B&2(B 1	
     = --------- - 2$B!_J?6Q!_(B-------- +($BJ?6Q(B)2$B!_(B------
           n                   n                n

     = (($BAGE@(B)2 $B$NJ?6Q(B) - ($BJ?6Q(B)2

$B1i=,(B8-18

$B0J2<$N?t$NJP:9CM$r5a$a$J$5$$!#(B $BC"$7JP:9CM$O

          ($BAGE@(B - $BJ?6Q(B)
$BJP:9CM(B = --------------- $B!_(B 10 + 50
             $BI8=`JP:9(B
3.5, 2.0, 5.5, 2.3

$B1i=,(B8-19

$B0J2<$N?t$N%Z%"(B(xi, yi)$B$,!"J}Dx<0(B y= ax+b $B$r$[$\K~$?$94X78$,$"$k;~!"$3$N(B a, b $B$NCM$r:G>.Fs>hK!$r(B $B;H$C$F5a$a$J$5$$!#(B

(2.3, 4.5), (1.1, 2.4), (5.5, 10.9), (4.9, 10.0)
$B%R%s%H(B

$B:G>.Fs>hK!$K$h$k$H!"(B a $B$H(B b $B$O

($B&2(Bxi2) a + ($B&2(Bxi) b = $B&2(B(xiyi)
($B&2(Bxi)  a +     n b = $B&2(Byi

$B:dK\D>;V(B <[email protected]>
$BEl5~EE5!Bg3X9)3XIt>pJsDL?.9)3X2J(B