ffa_ch3_shifts.kv 1
ffa_ch3_shifts.kv 2
ffa_ch3_shifts.kv 3
ffa_ch3_shifts.kv 4
ffa_ch15_gcd.kv 5
ffa_ch3_shifts.kv 6
ffa_ch3_shifts.kv 7
ffa_ch3_shifts.kv 8
ffa_ch3_shifts.kv 9
ffa_ch3_shifts.kv 10
ffa_ch3_shifts.kv 11
ffa_ch3_shifts.kv 12
ffa_ch3_shifts.kv 13
ffa_ch3_shifts.kv 14
ffa_ch3_shifts.kv 15
ffa_ch3_shifts.kv 16
ffa_ch3_shifts.kv 17
ffa_ch3_shifts.kv 18
ffa_ch3_shifts.kv 19
ffa_ch3_shifts.kv 20
ffa_ch3_shifts.kv 21 with Ada.Text_IO; use Ada.Text_IO;
ffa_ch3_shifts.kv 22
ffa_ch3_shifts.kv 23
ffa_ch3_shifts.kv 24 with Words; use Words;
ffa_ch3_shifts.kv 25 with FZ_Type; use FZ_Type;
ffa_ch3_shifts.kv 26
ffa_ch3_shifts.kv 27
ffa_ch3_shifts.kv 28 with FZ_Shift; use FZ_Shift;
ffa_ch3_shifts.kv 29
ffa_ch3_shifts.kv 30
ffa_ch3_shifts.kv 31 with FFA_IO; use FFA_IO;
ffa_ch3_shifts.kv 32
ffa_ch3_shifts.kv 33
ffa_ch3_shifts.kv 34 package body Demo_Ch3 is
ffa_ch3_shifts.kv 35
ffa_ch3_shifts.kv 36 procedure Demo_Shifts is
ffa_ch3_shifts.kv 37
ffa_ch3_shifts.kv 38 X : FZ(1 .. 4) := ( 16#083e16f27091f65f#, 16#74c01a9c3ce54f80#,
ffa_ch3_shifts.kv 39 16#9fd0913737c3fcbe#, 16#fa55f3f5459a9e79# );
ffa_ch3_shifts.kv 40
ffa_ch3_shifts.kv 41 Z : FZ(1 .. 4) := ( 0, 0, 0, 0 );
ffa_ch3_shifts.kv 42
ffa_ch3_shifts.kv 43
ffa_ch3_shifts.kv 44 O : Word := 0;
ffa_ch3_shifts.kv 45
ffa_ch3_shifts.kv 46 begin
ffa_ch3_shifts.kv 47
ffa_ch3_shifts.kv 48 Put_Line("~~~ Ch. 3 : Shifts ~~~");
ffa_ch3_shifts.kv 49 New_Line;
ffa_ch3_shifts.kv 50
ffa_ch3_shifts.kv 51 Put_Line("X =");
ffa_ch3_shifts.kv 52 Dump(X);
ffa_ch3_shifts.kv 53 New_Line;
ffa_ch3_shifts.kv 54 New_Line;
ffa_ch3_shifts.kv 55
ffa_ch3_shifts.kv 56
ffa_ch3_shifts.kv 57
ffa_ch3_shifts.kv 58 FZ_ShiftLeft_O(X, Z, 1, O);
ffa_ch3_shifts.kv 59 Put_Line("X << 1 =");
ffa_ch3_shifts.kv 60 Dump(Z);
ffa_ch3_shifts.kv 61 New_Line;
ffa_ch3_shifts.kv 62 Put_Line("Overflow = ");
ffa_ch3_shifts.kv 63 Dump(O);
ffa_ch3_shifts.kv 64 New_Line;
ffa_ch3_shifts.kv 65
ffa_ch3_shifts.kv 66 FZ_ShiftLeft_O(X, Z, 13, O);
ffa_ch3_shifts.kv 67 Put_Line("X << 13 =");
ffa_ch3_shifts.kv 68 Dump(Z);
ffa_ch3_shifts.kv 69 New_Line;
ffa_ch3_shifts.kv 70 Put_Line("Overflow = ");
ffa_ch3_shifts.kv 71 Dump(O);
ffa_ch3_shifts.kv 72 New_Line;
ffa_ch3_shifts.kv 73
ffa_ch3_shifts.kv 74 FZ_ShiftLeft_O(X, Z, 40, O);
ffa_ch3_shifts.kv 75 Put_Line("X << 40 =");
ffa_ch3_shifts.kv 76 Dump(Z);
ffa_ch3_shifts.kv 77 New_Line;
ffa_ch3_shifts.kv 78 Put_Line("Overflow = ");
ffa_ch3_shifts.kv 79 Dump(O);
ffa_ch3_shifts.kv 80 New_Line;
ffa_ch3_shifts.kv 81
ffa_ch3_shifts.kv 82
ffa_ch3_shifts.kv 83
ffa_ch3_shifts.kv 84 FZ_ShiftRight_O(X, Z, 1, O);
ffa_ch3_shifts.kv 85 Put_Line("X >> 1 =");
ffa_ch3_shifts.kv 86 Dump(Z);
ffa_ch3_shifts.kv 87 New_Line;
ffa_ch3_shifts.kv 88 Put_Line("Overflow = ");
ffa_ch3_shifts.kv 89 Dump(O);
ffa_ch3_shifts.kv 90 New_Line;
ffa_ch3_shifts.kv 91
ffa_ch3_shifts.kv 92 FZ_ShiftRight_O(X, Z, 13, O);
ffa_ch3_shifts.kv 93 Put_Line("X >> 13 =");
ffa_ch3_shifts.kv 94 Dump(Z);
ffa_ch3_shifts.kv 95 New_Line;
ffa_ch3_shifts.kv 96 Put_Line("Overflow = ");
ffa_ch3_shifts.kv 97 Dump(O);
ffa_ch3_shifts.kv 98 New_Line;
ffa_ch3_shifts.kv 99
ffa_ch3_shifts.kv 100 FZ_ShiftRight_O(X, Z, 40, O);
ffa_ch3_shifts.kv 101 Put_Line("X >> 40 =");
ffa_ch3_shifts.kv 102 Dump(Z);
ffa_ch3_shifts.kv 103 New_Line;
ffa_ch3_shifts.kv 104 Put_Line("Overflow = ");
ffa_ch3_shifts.kv 105 Dump(O);
ffa_ch3_shifts.kv 106 New_Line;
ffa_ch3_shifts.kv 107
ffa_ch3_shifts.kv 108 end Demo_Shifts;
ffa_ch3_shifts.kv 109
ffa_ch3_shifts.kv 110 end Demo_Ch3;