( ) , , , , . . , (. 1.4):
1.4
: 8 = 0,658. . , 16 . : 16 = 2i. 16 = 24, i = 4 . 4 . , (), , , , . ( ) , , . , (. 1.5). 2 = 1010012 :
1.5
: . (. 1.6):
1.6
D |
: . , .
0,1. . XVI . . , . . .
. , , :
. . : + .
|
|
: : .
. , .
+ 110,1011
10111,10101
10001,00011
, , . , .
.
. , , . , , . , , . . .
II.
. ic - . , .
Menu :
1. ( );
2.
- .
- .
- .
- .
3. .
Menu Turbo Pascal Graph initGraph, . Graph Setcolor, , , Setcolor(5) , . OutTextXY . OutTextXY, OutText . GotoXY .
: |
procedure Menu; begin initGraph(a,b,''); Setcolor(5); outtextxy(100,10,'GLAVNOE MENU'); outtextxy(100,30,'1-Teoriticheski material'); outtextxy(100,40,'2-Prakticheskii schet'); outtextxy(100,50,'3-vihod'); Gotoxy(25,7); outtextxy(100,100,'Vash vibor:'); read(men); Readln; closegraph; end; |
PERdectodva PERdvatodec , , : DectoDvo Procedure DvatoDec.
PERdectodva Graph. 10 5. DvatoDec, .
|
|
: |
procedure PERdectodva; begin initGraph(a,b,''); outtextxy(10,5,'Vvedite desiatichnoe chislo '); gotoxy(30,1); readln(CHIS); DvatoDec(CHIS); outtextxy(10,20,'dvoichnoe chislo'); outtextxy(200,20,D); Readln; closegraph; end; |
DvatoDec . . , . : while CH<>0do.
: |
procedure DvatoDec(CH:integer); var LS,sl,n:integer; DD:string; begin DD:=''; while CH<>0 do begin ls:=CH mod 2; ch:=ch div 2; if ls=1 then DD:='1'+DD; if ls=0 then DD:='0'+DD; end; D:=DD; end; |
DectoDvo .
Slojenie Vichit , .
Slojenie Graph. , DectoDvo, TMP . , . TMP:=CHIS+TMP. DvatoDec .
: |
procedure Slojenie; var TMP:integer; begin initGraph(a,b,''); outtextxy(10,5,'Vvedite pervoe dvoichnoe chislo'); gotoxy(35,1);readln(D); DectoDvo(D); TMP:=CHIS; outtextxy(10,20,'Vvedite vtoroe dvoichnoe chislo'); gotoxy(35,2);readln(D); DectoDvo(D); TMP:=CHIS+TMP; DvatoDec(TMP); Outtextxy(10,35,'otvet '); Outtextxy(100,35,D); Readln; closegraph; end; |
Vichit , Slojenie. , , . DvatoDec, .
: |
procedure Vichit; var TMP:integer; begin initGraph(a,b,''); outtextxy(10,5,'Vvedite pervoe dvoichnoe chislo'); gotoxy(35,1);readln(D); DectoDvo(D); TMP:=CHIS; outtextxy(10,20,'Vvedite vtoroe dvoichnoe chislo'); gotoxy(35,2);readln(D); DectoDvo(D); TMP:=TMP-CHIS; DvatoDec(TMP); Outtextxy(10,35,'otvet '); Outtextxy(100,35,D); Readln; closegraph; end; |
PERdectoSh , , : DectoSh.
Teoria . - keypressED, , , . Enter .
Praktika :
- ;
- ;
- ;
- ;
- ;
- .
|
|
: |
procedure Praktika; begin initGraph(a,b,''); SPISOK1; while RAZDEL<>9 do begin case RAZDEL of 1: PERdvatodec; 2: PERdectodva; 3: Slojenie; 4: Vichit; end; SPISOK1; end; closegraph; end; |
Graph, :
Rectangle(1,2;2,2) - , . (1,1) , (1,2) .
SetColor(color: word) - Color.
Circle(,:integer;R:word) - R. (,) .
Line(1,1,2,2:integer) (X1,Y1) (X2,Y2), SetLineStyle, SetColor.
Settextstyle .