<?php
session_start ();
?>
<form method="POST" action="./form20240305.php">
<input type="text" name="form2024030501"></input>
<input type="submit">
</form>
<?php
echo session_id () . "<br>n";
setcookie ("form2024030502", "Dies ist Cookie 1", time () + 2400);
echo htmlentities (\$_COOKIE ["form2024030502"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form2024030503"]) . "<br>n";
echo htmlentities (\$_POST ["form2024030501"]) . "<br>n";
session_destroy ();
?>
POST http://localhost/mysql20240217/20240305/form20240305.php HTTP/1.1 host: localhost Cookie: form2024030503=Hallo, ich bin Cookie 2 Content-Length: 42 Content-Type: application/x-www-form-urlencoded form2024030501=Hallo, ich bin das 1. Datum
Trying ::1... Connected to localhost. Escape character is '\^]'. HTTP/1.1 200 OK Date: Tue, 05 Mar 2024 14:26:13 GMT Server: Apache/2.4.57 (Debian) Set-Cookie: PHPSESSID=tbqtkff74r895kvil9ht13tveh; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate Pragma: no-cache Set-Cookie: form2024030502=Dies%20ist%20Cookie%201; expires=Tue, 05 Mar 2024 15:06:13 GMT; Max-Age=2400 Vary: Accept-Encoding Content-Length: 227 Content-Type: text/html; charset=UTF-8 <form method="POST" action="./form20240305.php"> <input type="text" name="form2024030501"></input> <input type="submit"> </form> tbqtkff74r895kvil9ht13tveh<br> <br> Hallo, ich bin Cookie 2<br> Hallo, ich bin das 1. Datum<br>
<?php
session_start ();
include ("/home/david/mysqldata.php");
\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);
\$sql = "CREATE DATABASE mysql20240305" . session_id () . "; ";
\$db->query (\$sql);
\$sql = "USE mysql20240305" . session_id () . "; ";
\$db->query (\$sql);
\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); ";
\$db->query (\$sql);
\$sql = "CREATE TABLE b (y1 INTEGER, y2 INTEGER); ";
\$db->query (\$sql);
\$sql = "INSERT INTO a (x1, x2) VALUES (0, 0); ";
\$db->query (\$sql);
\$sql = "INSERT INTO a (x1, x2) VALUES (0, 1); ";
\$db->query (\$sql);
\$sql = "INSERT INTO a (x1, x2) VALUES (1, 0); ";
\$db->query (\$sql);
\$sql = "INSERT INTO a (x1, x2) VALUES (1, 1); ";
\$db->query (\$sql);
\$sql = "INSERT INTO a (x1, x2) VALUES (2, 7); ";
\$db->query (\$sql);
\$sql = "INSERT INTO b (y1, y2) VALUES (0, 1); INSERT INTO b (y1, y2) VALUES (1, 0); INSERT INTO b (y1, y2) VALUES (2, 7); ";
\$db->query (\$sql);
\$sql = "SELECT x1, x2 FROM a; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", " . \$row [1] . "<br>n";
echo "<br>n";
\$sql = "SELECT y1, y2 FROM b; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", " . \$row [1] . "<br>n";
echo "<br>n";
\$sql = "SELECT x1, x2, y1, y2 FROM a INNER JOIN b; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", " . \$row [1] . ", " . \$row [2] . ", " . \$row [3] . "<br>n";
echo "<br>n";
\$sql = "DROP DATABASE mysql20240305" . session_id () . "; ";
\$db->query (\$sql);
session_destroy ();
?>
0, 0<br> 0, 1<br> 1, 0<br> 1, 1<br> 2, 7<br> <br> 0, 1<br> 1, 0<br> 2, 7<br> <br> 0, 0, 0, 1<br> 0, 0, 1, 0<br> 0, 0, 2, 7<br> 0, 1, 0, 1<br> 0, 1, 1, 0<br> 0, 1, 2, 7<br> 1, 0, 0, 1<br> 1, 0, 1, 0<br> 1, 0, 2, 7<br> 1, 1, 0, 1<br> 1, 1, 1, 0<br> 1, 1, 2, 7<br> 2, 7, 0, 1<br> 2, 7, 1, 0<br> 2, 7, 2, 7<br> <br>
0, 0<br> 0, 1<br> 1, 0<br> 1, 1<br> 2, 7<br> <br> 0, 1<br> 1, 0<br> 2, 7<br> <br> 0, 0, 0, 1<br> 0, 0, 1, 0<br> 0, 0, 2, 7<br> 0, 1, 0, 1<br> 0, 1, 1, 0<br> 0, 1, 2, 7<br> 1, 0, 0, 1<br> 1, 0, 1, 0<br> 1, 0, 2, 7<br> 1, 1, 0, 1<br> 1, 1, 1, 0<br> 1, 1, 2, 7<br> 2, 7, 0, 1<br> 2, 7, 1, 0<br> 2, 7, 2, 7<br> <br>
<?php
session_start ();
include ("/home/david/mysqldata.php");
\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);
\$sql = "CREATE DATABASE q20240305" . session_id () . "; ";
\$db->query (\$sql);
\$sql = "USE q20240305" . session_id () . "; ";
\$db->query (\$sql);
\$sql = "CREATE TABLE a (x INTEGER); ";
\$db->query (\$sql);
\$sql = "CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);
for (\$i = 0; \$i < 32; \$i++) {
\$sql = "INSERT INTO a (x) VALUES ("" . rand () % 48 . ""); ";
\$db->query (\$sql);
\$sql = "INSERT INTO b (x) VALUES ("" . rand () % 64 . ""); ";
\$db->query (\$sql);
\$sql = "INSERT INTO c (x) VALUES ("" . rand () % 96 . ""); ";
\$db->query (\$sql);
}
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (
SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
INTERSECT
SELECT x FROM c
) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (
SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
UNION
SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (
SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
INTERSECT
SELECT x FROM b
) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (
SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
UNION
SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM b) x
) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (
SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
INTERSECT
SELECT x FROM a
) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "SELECT x FROM (
SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM a) x
UNION
SELECT x FROM (SELECT x FROM c INTERSECT SELECT x FROM a) x
) x;";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
echo \$row [0] . ", ";
echo "<br>n";
\$sql = "DROP DATABASE q20240305" . session_id () . "; ";
\$db->query (\$sql);
session_destroy ();
?>
15, 23, 1, 37, 44, 47, 30, 40, 11, 24, 34, 36, 4, 28, 19, 2, 25, 9, 32, 8, 27, 6, 7, 45, 29, 57, 50, 12, 42, 5, 58, 49, 33, 31, 13, 48, 59, 14, 20, 54, 46, <br> 15, 23, 1, 37, 44, 47, 30, 40, 11, 24, 34, 36, 4, 28, 19, 2, 25, 9, 32, 8, 27, 6, 7, 45, 29, 62, 79, 42, 95, 86, 85, 93, 48, 84, 55, 17, 63, 51, 57, 71, 35, 18, 82, <br> 23, 57, 50, 12, 42, 5, 9, 58, 49, 33, 31, 13, 7, 40, 1, 48, 59, 2, 14, 20, 54, 46, 6, 28, 44, 62, 37, 79, 4, 25, 95, 86, 85, 93, 27, 84, 55, 17, 34, 63, 51, 8, 71, 35, 32, 24, 18, 82, <br> 23, 1, 44, 40, 28, 2, 9, 6, 7, <br> 1, 37, 24, 34, 4, 28, 2, 25, 32, 8, 27, 7, <br> 57, 42, 7, 1, 48, 2, 28, <br> 1, 37, 24, 34, 4, 28, 2, 25, 32, 8, 27, 7, 57, 42, 48, <br> 1, 37, 24, 34, 4, 28, 2, 25, 32, 8, 27, 7, 57, 42, 48, <br> 23, 1, 44, 40, 28, 2, 9, 6, 7, 42, 48, 57, <br> 23, 1, 44, 40, 28, 2, 9, 6, 7, 42, 48, 57, <br> 23, 9, 7, 40, 1, 2, 6, 28, 44, 37, 4, 25, 27, 34, 8, 32, 24, <br> 23, 9, 7, 40, 1, 2, 6, 28, 44, 37, 4, 25, 27, 34, 8, 32, 24, <br>
#!/bin/bash
if [[ "\$1" == "David" \&\& "\$2" == "Vajda" ]]
then
echo "Das bin ich"
elif [[ "\$1" == "David Vajda" \&\& -z "\$s2" ]]
then
echo "Das bin ich"
elif [[ "\$1" == "David" \&\& -z "\$2" ]]
then
echo "Das koennte ich sein"
elif [[ "\$2" == "Vajda" \&\& -z "\$2" ]]
then
echo "Das koennte ich sein"
elif [[ -n "\$1" ]]
then
echo "Das bin ich nicht"
else
i=0
while [ \$i -lt 5 ]
do
echo "Hallo zum \$((\$i+1))."
i=\$((\$i+1))
done
a=(Auch das ist ein Array)
a+=(Das sich fortsetzt)
i=0
while [ \$i -lt 7 ]
do
echo "\${a[\$i]}"
i=\$((\$i+1))
done
for s in "\${a[@]}"
do
echo "\$s"
done
l=\$(ls)
for s in \$l
do
echo "\$s"
done
echo "Hello World"
fi
#!/bin/bash /bin/bash myhello.sh "David" "Vajda" /bin/bash myhello.sh "David Vajda" /bin/bash myhello.sh "David" /bin/bash myhello.sh "Vajda" /bin/bash myhello.sh "David" "Mustermann" /bin/bash myhello.sh "Max" "Mustermann" /bin/bash myhello.sh
Das bin ich
Das bin ich
Das koennte ich sein
Das bin ich nicht
Das bin ich nicht
Das bin ich nicht
Hallo zum 1.
Hallo zum 2.
Hallo zum 3.
Hallo zum 4.
Hallo zum 5.
Auch
das
ist
ein
Array
Das
sich
Auch
das
ist
ein
Array
Das
sich
fortsetzt
myhelloexec.sh
myhello.out
myhello.sh
Hello World
So, jetzt mache jetzt schriftliche Rechenaufgaben, danach das Quine Mc Cluskey und danach die Aufgaben mit den Zuständen.
1.) Rechne die Zahl in binaer Darstellung in eine Dezimale Darstellung um
0011010111100110b 13798d
2.) Rechne die Zahl in dezimal darstellung in eine Binaerdarstellung um
50597 1100010110100101
3.) Addiere die drei Zahlen schriftlich
39007
+ 1367
+ 3453
-----------------
43827
4.) Subtrahiere die letzten drei Zahlen schriftlich von der ersten schriftlich
50804
- 3203
- 4972
- 15541
-----------------
27088
5.) Rechne die Zahl ins zweier komplement um, mit 8 Bit - und subtrahiere diese zahl von der ersten und rechne das Ergebnis nach dezimal
127 -112 = 15
01111111 10010000 = 00001111
6.) Multipliziere die zwei Zahlen schriftlich
35381*46143 = 1632585483
7.) Dividiere die zwei Zahlen schriftlich
51252/24887 = 2
8.) Errechne x Logarithmisch mit dem Taschenrechner
43137\^x = 306082252
Ich mache jetzt weiter Aufgaben - ich habe auswendig gelernt und war im Wald.
Nachdem das nun geschehen ist, werde ich ein Quine Mc Cluskey machen und danach den Rest, heute auch komplexe Schaltwerke
0 0 0 0 0 0
1 0 0 0 1 1
2 0 0 1 0 1
3 0 0 1 1 0
4 0 1 0 0 0
5 0 1 0 1 1
6 0 1 1 0 0
7 0 1 1 1 1
8 1 0 0 0 0
9 1 0 0 1 1
10 1 0 1 0 1
11 1 0 1 1 0
12 1 1 0 0 0
13 1 1 0 1 0
14 1 1 1 0 1
15 1 1 1 1 0
1 0 0 0 1 1
2 0 0 1 0 1
5 0 1 0 1 1
7 0 1 1 1 1
9 1 0 0 1 1
10 1 0 1 0 1
14 1 1 1 0 1
Gruppe 1:
1 0 0 0 1 1
2 0 0 1 0 1
Gruppe 2::
5 0 1 0 1 1
9 1 0 0 1 1
10 1 0 1 0 1
Gruppe 3:
7 0 1 1 1 1
14 1 1 1 0 1
1:5 0 - 0 1
1:9 - 0 0 1
2:10 - 0 1 0
5:7 0 1 - 1
10:14 1 - 1 0
1:5 0 - 0 1
10:14 1 - 1 0
5:7 0 1 - 1
1:9 - 0 0 1
2:10 - 0 1 0
Gruppe 1:
1:5 0 - 0 1
Gruppe 2:
10:14 1 - 1 0
Gruppe 2:
5:7 0 1 - 1
Gruppe 1:
1:9 - 0 0 1
2:10 - 0 1 0
1:5 0 - 0 1
10:14 1 - 1 0
5:7 0 1 - 1
1:9 - 0 0 1
2:10 - 0 1 0
1 2 5 7 9 10 14
1:5 * *
10:14 * *
5:7 * *
1:9 * *
2:10 * *
1 2 5 7 9 10 14
10:14 * *
5:7 * *
1:9 * *
2:10 * *
10:14 1 - 1 0
5:7 0 1 - 1
1:9 - 0 0 1
2:10 - 0 1 0
y <= (x3 and x1 and not x0) or
(not x3 and x2 and x0) or
(not x2 and not x1 and x0) or
(not x2 and x1 and not x0);
y <= not (
(not x3 or not x1 or x0) and
(x3 or not x2 or not x0) and
(x2 or x1 or not x0) and
(x2 or not x1 or x0)
);
library ieee;
use ieee.std_logic_1164.all;
entity quine20240305 is
port (
x3, x2, x1, x0: in std_logic;
y: out std_logic
);
end;
architecture behaviour of quine20240305 is
begin
y <= (x3 and x1 and not x0) or
(not x3 and x2 and x0) or
(not x2 and not x1 and x0) or
(not x2 and x1 and not x0);
end;
library ieee;
use ieee.std_logic_1164.all;
entity quine20240305testbench is
port (
y: out std_logic
);
end;
architecture behaviour of quine20240305testbench is
component quine20240305
port (
x3, x2, x1, x0: in std_logic;
y: out std_logic
);
end component;
signal x3, x2, x1, x0: std_logic;
begin
q: quine20240305 PORT MAP (x3=>x3, x2=>x2, x1=>x1, x0=>x0, y=>y);
library ieee;
use ieee.std_logic_1164.all;
entity quine20240305 is
port (
x3, x2, x1, x0: in std_logic;
y: out std_logic
);
end;
architecture behaviour of quine20240305 is
begin
y <= (x3 and x1 and not x0) or
(not x3 and x2 and x0) or
(not x2 and not x1 and x0) or
(not x2 and x1 and not x0);
end;
library ieee;
use ieee.std_logic_1164.all;
entity quine20240305testbench is
port (
y: out std_logic
);
end;
architecture behaviour of quine20240305testbench is
component quine20240305
port (
x3, x2, x1, x0: in std_logic;
y: out std_logic
);
end component;
signal x3, x2, x1, x0: std_logic;
begin
q: quine20240305 PORT MAP (x3=>x3, x2=>x2, x1=>x1, x0=>x0, y=>y);
x0 <= '0' after 0 ns, '1' after 10 ns, '0' after 20 ns, '1' after 30 ns, '0' after 40 ns, '1' after 50 ns, '0' after 60 ns, '1' after 70 ns, '0' after 80 ns, '1' after 90 ns, '0' after 100 ns, '1' after 110 ns, '0' after 120 ns, '1' after 130 ns, '0' after 140 ns, '1' after 150 ns;
x1 <= '0' after 0 ns, '0' after 10 ns, '1' after 20 ns, '1' after 30 ns, '0' after 40 ns, '0' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns, '0' after 90 ns, '1' after 100 ns, '1' after 110 ns, '0' after 120 ns, '0' after 130 ns, '1' after 140 ns, '1' after 150 ns;
x2 <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '1' after 40 ns, '1' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns, '0' after 90 ns, '0' after 100 ns, '0' after 110 ns, '1' after 120 ns, '1' after 130 ns, '1' after 140 ns, '1' after 150 ns;
x3 <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '0' after 40 ns, '0' after 50 ns, '0' after 60 ns, '0' after 70 ns, '1' after 80 ns, '1' after 90 ns, '1' after 100 ns, '1' after 110 ns, '1' after 120 ns, '1' after 130 ns, '1' after 140 ns, '1' after 150 ns;
end;
So, jetzt folgt die Zustandsminimierung bezüglich kodierung.
Zustand Folge-Zustand fuer Ausgang x=0 x=1 1 5 6 1 2 7 5 1 3 6 4 0 4 3 4 1 5 2 7 1 6 6 1 0 7 5 2 1 8 2 8 1 1 5 6 1 2 7 5 1 4 3 4 1 5 2 7 1 7 5 2 1 8 2 8 1 (1,2) (5,7) (6,5) (1,4) (5,3) (6,4) (1,5) (5,2) (6,7) (1,7) (5,5) (6,2) (1,8) (5,2) (6,8) (2,4) (7,3) (5,4) (2,5) (7,2) (5,7) (2,7) (7,5) (5,2) (2,8) (7,2) (5,8) (4,5) (3,2) (4,7) (4,7) (3,5) (4,2) (4,8) (3,2) (4,8) (5,7) (2,5) (7,2) (5,8) (2,2) (7,8) (7,8) (5,2) (2,8) 3 6 4 0 6 6 1 0 (3,6) (6,6) (4,1) (1,2) (5,7) (6,5) (1,4) (5,3) (6,4) (1,5) (5,2) (6,7) (1,7) (5,5) (6,2) (1,8) (5,2) (6,8) (2,4) (7,3) (5,4) (2,5) (7,2) (5,7) (2,7) (7,5) (5,2) (2,8) (7,2) (5,8) (3,6) (6,6) (4,1) (4,5) (3,2) (4,7) (4,7) (3,5) (4,2) (4,8) (3,2) (4,8) (5,7) (2,5) (7,2) (5,8) (2,2) (7,8) (7,8) (5,2) (2,8) (1,2) (5,7) (5,6) (1,4) (3,5) (4,6) (1,5) (2,5) (6,7) (1,7) (5,5) (2,6) (1,8) (2,5) (6,8) (2,4) (3,7) (4,5) (2,5) (2,7) (5,7) (2,7) (5,7) (5,2) (2,8) (2,7) (5,8) (3,6) (6,6) (2,4) (4,5) (2,3) (4,7) (4,7) (3,5) (4,2) (4,8) (2,3) (4,8) (5,7) (2,5) (2,7) (5,8) (2,2) (7,8) (7,8) (2,5) (2,8) (1,2) (5,7) (5,6) (1,4) (3,5) (4,6) (1,5) (2,5) (6,7) (1,7) (2,6) (1,8) (2,5) (6,8) (2,4) (3,7) (4,5) (2,5) (2,7) (5,7) (2,7) (5,7) (5,2) (2,8) (2,7) (5,8) (3,6) (2,4) (4,5) (2,3) (4,7) (4,7) (3,5) (4,2) (4,8) (2,3) (4,8) (5,7) (2,5) (2,7) (5,8) (7,8) (7,8) (2,5) (2,8) --(1,2) (5,7) --(5,6) --(1,4) --(3,5) (4,6) --(1,5) (2,5) --(6,7) --(1,7) --(2,6) --(1,8) (2,5) --(6,8) --(2,4) --(3,7) (4,5) (2,5) (2,7) (5,7) (2,7) (5,7) (2,5) (2,8) (2,7) (5,8) --(3,6) --(2,4) --(4,5) --(2,3) (4,7) --(4,7) --(3,5) (4,2) --(4,8) --(2,3) (4,8) (5,7) (2,5) (2,7) (5,8) (7,8) (7,8) (2,5) (2,8) (2,5) (2,7) (5,7) (2,7) (5,7) (2,5) (2,8) (2,7) (5,8) (5,7) (2,5) (2,7) (5,8) (7,8) (7,8) (2,5) (2,8)
Gut