<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>[CS@TUK] Questions and Answers - Recent questions and answers in # Mandatory Modules Bachelor</title>
<link>https://q2a.cs.uni-kl.de/qa/%23-mandatory-modules-bachelor</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Guten Abend Unklarheit beim ausfüllung von gelbe markierte Werte</title>
<link>https://q2a.cs.uni-kl.de/4063/guten-abend-unklarheit-beim-ausf%C3%BCllung-gelbe-markierte-werte?show=4064#a4064</link>
<description>&lt;p&gt;Die Sequenz von Lade-/Speicherbefehlen arbeitet also mit den folgenden Blöcken:&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px; border-spacing: 1px;&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th scope=&quot;col&quot;&gt;Mem.Adr.&lt;/th&gt;&lt;th scope=&quot;col&quot;&gt;BlockAdr.&lt;/th&gt;&lt;th scope=&quot;col&quot;&gt;Tag/CacheAdr&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;L(0)&lt;/td&gt;&lt;td&gt;L(0)&lt;/td&gt;&lt;td&gt;0*4+0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(15)&lt;/td&gt;&lt;td&gt;L(7)&lt;/td&gt;&lt;td&gt;1*4+3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;S(16)&lt;/td&gt;&lt;td&gt;S(8)&lt;/td&gt;&lt;td&gt;&amp;nbsp;2*4+0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(1)&lt;/td&gt;&lt;td&gt;L(0)&lt;/td&gt;&lt;td&gt;0*4+0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(14) &amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td&gt;L(7)&lt;/td&gt;&lt;td&gt;1*4+3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;S(17)&amp;nbsp;&lt;/td&gt;&lt;td&gt;S(8)&lt;/td&gt;&lt;td&gt;2*4+0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(2)&amp;nbsp;&lt;/td&gt;&lt;td&gt;L(1)&lt;/td&gt;&lt;td&gt;0*4+1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(13)&amp;nbsp;&lt;/td&gt;&lt;td&gt;L(6)&lt;/td&gt;&lt;td&gt;&amp;nbsp;1*4+2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;S(18)&amp;nbsp;&lt;/td&gt;&lt;td&gt;S(9)&lt;/td&gt;&lt;td&gt;&amp;nbsp;2*4+1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(3)&lt;/td&gt;&lt;td&gt;L(1)&lt;/td&gt;&lt;td&gt;0*4+1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(12)&amp;nbsp;&lt;/td&gt;&lt;td&gt;L(6)&lt;/td&gt;&lt;td&gt;&amp;nbsp;1*4+2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;S(19)&lt;/td&gt;&lt;td&gt;S(9)&lt;/td&gt;&lt;td&gt;&amp;nbsp;2*4+1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(4)&amp;nbsp;&lt;/td&gt;&lt;td&gt;L(2)&lt;/td&gt;&lt;td&gt;0*4+2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;L(11)&amp;nbsp;&lt;/td&gt;&lt;td&gt;L(5)&lt;/td&gt;&lt;td&gt;&amp;nbsp;1*4+1&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;S(20)&lt;/td&gt;&lt;td&gt;S(10)&lt;/td&gt;&lt;td&gt;&amp;nbsp;2*4+2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Damit wissen wir, welcher Block mit welchen beiden Wortadressen in den Cache geladen werden soll und wir wissen, in welcher Cache-Adresse dieser Block gefunden werden kann oder geladen werden muss. Dazu schauen wir an der Cache-Adresse nach, ob sich dort ein Block mit dem erwünschten Tag befindet. Wenn ja, haben wir den Block im Cache gefunden und haben einen Cache-Treffen. Wenn nein, dann muss der Block in den Cache geladen werden. Dazu muss evtl. erst ein vorhandener Block in den Speicher zurückgeschrieben werden. Um dies zu entscheiden, müssen wir uns merken, welche Blöcke verändert worden sind.&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4063/guten-abend-unklarheit-beim-ausf%C3%BCllung-gelbe-markierte-werte?show=4064#a4064</guid>
<pubDate>Tue, 09 Jul 2024 13:35:49 +0000</pubDate>
</item>
<item>
<title>Answered: Guten morgen , im Bezug auf die Berechnung der Speedup</title>
<link>https://q2a.cs.uni-kl.de/4056/guten-morgen-im-bezug-auf-die-berechnung-der-speedup?show=4058#a4058</link>
<description>Eigentlich gibt es für den SpeedUp nur eine Formel, nämlich den Quotienten von alter Laufzeit durch neue Laufzeit, der angibt, um welchen Faktor die Programmausführung schneller geworden ist.&lt;br /&gt;
&lt;br /&gt;
Vermutlich meinen Sie aber die Formeln für den SpeedUp von Pipelines, die Schritt für Schritt unterschiedliche Aspekte berücksichtigt haben. Da reicht aber die letzte der Formeln, da die anderen Spezialfälle sind, bei denen manche Parameter 0 sind. Aber selbst diese Formel lohnt sich selten und man schaut besser die aktuelle Situation der Aufgabenstellung an.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4056/guten-morgen-im-bezug-auf-die-berechnung-der-speedup?show=4058#a4058</guid>
<pubDate>Sat, 23 Mar 2024 09:45:36 +0000</pubDate>
</item>
<item>
<title>Answered: Nops after Jump Instruction</title>
<link>https://q2a.cs.uni-kl.de/4055/nops-after-jump-instruction?show=4057#a4057</link>
<description>Well, it depends. If you look at the pipeline implementation, jump instructions are certainly fetched, and decoded as all other instructions. What needs to be done for a jump instruction is to add the direct operand that comes with the jump instruction to the program counter. So, all that we need is an adder. &lt;br /&gt;
&lt;br /&gt;
Now, you can implement the jump instruction in such a way that the required addition is done in the execution stage, and that the assignment to the program counter is done in the write back stage. If it would be done like this, we need nops after jump instructions in the same way as for branch instructions. The implementation of Abacus on slide 53 does this.&lt;br /&gt;
&lt;br /&gt;
If we use forwarding, we want to use values as soon as they are available. For jump instruction, we still would have to wait for the addition in the execution phase. However, adders are not expensive, and therefore most processors spend another adder in the ID stage to perform the addition required for jump instructions. Slide 85 shows that implementation of the jump instructions which then requires no stalling anymore (provided register bypassing is used as well).&lt;br /&gt;
&lt;br /&gt;
TLTR: It depends on the pipeline implementation, and with forwarding you may assume no further Nops, without you better ask how the jump instructions are implemented.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4055/nops-after-jump-instruction?show=4057#a4057</guid>
<pubDate>Sat, 23 Mar 2024 09:40:58 +0000</pubDate>
</item>
<item>
<title>Answered: Warum wird die sync Anweisung bei der Ausführungszeit eines Programms nicht beachtet ?</title>
<link>https://q2a.cs.uni-kl.de/4050/warum-anweisung-ausf%C3%BChrungszeit-eines-programms-beachtet?show=4053#a4053</link>
<description>Die Anweisung &amp;quot;sync&amp;quot; sorgt dafür, dass alle Cache-Inhalte in den Hauptspeicher zurückgeschrieben werden und dass (falls vorhanden) Store-Buffer von Multicore-Versionen geleert werden. Damit kann man sicher sein, dass danach die Inhalte der lokalen Speicher (Caches und Store-Buffer) für andere Cores sichtbar sind und damit eine Prozesssynchronization stattfinden kann. Man kann dann auch sicher Inhalte vom Hauptspeicher auf die Festplatte übertragen und berücksichtigt dabei auch die Cache-Inhalte. &lt;br /&gt;
&lt;br /&gt;
Das sind aber alles Probleme, die uns in RoSy eher nicht beschäftigen. Die Anweisung &amp;quot;sync&amp;quot; wird hier meist am Ende der Programme angefügt, um (1) quasi &amp;quot;aufzuräumen&amp;quot; und (2) ein Sprungziel für Sprünge zum Programmende zu haben.&lt;br /&gt;
&lt;br /&gt;
Der zweite Fall ist in RoSy der entscheidende und dafür könnte man ebenso gut &amp;quot;nop&amp;quot; nehmen. Daher spielt &amp;quot;sync&amp;quot; keine große Rolle und kann in RoSy quasi auch als &amp;quot;nop&amp;quot; gelesen werden. Für die Lösung solcher Aufgaben würde die Behandlung von &amp;quot;sync&amp;quot; großzügig ausgelegt werden.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4050/warum-anweisung-ausf%C3%BChrungszeit-eines-programms-beachtet?show=4053#a4053</guid>
<pubDate>Thu, 21 Mar 2024 16:59:41 +0000</pubDate>
</item>
<item>
<title>Answered: Compiler Frontend</title>
<link>https://q2a.cs.uni-kl.de/4048/compiler-frontend?show=4049#a4049</link>
<description>&lt;p&gt;Your grammar describes the language waba + wabab where w is any word consisting of letters a&amp;nbsp;and b. So, the occurrence of aba is not at an arbitrary place within the word.&lt;/p&gt;&lt;p&gt;Why not the following?&lt;/p&gt;&lt;pre&gt;S -&amp;gt; aS | bS | A
A -&amp;gt; abaB
B -&amp;gt; aB | bB | &lt;/pre&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4048/compiler-frontend?show=4049#a4049</guid>
<pubDate>Wed, 20 Mar 2024 19:55:48 +0000</pubDate>
</item>
<item>
<title>Answered: wie kommen wir zu einer lösung dieser aufgabe</title>
<link>https://q2a.cs.uni-kl.de/4040/wie-kommen-wir-zu-einer-l%C3%B6sung-dieser-aufgabe?show=4041#a4041</link>
<description>Es gibt sicherlich sehr viele Programme, die man hier verwenden kann. Im Prinzip kann man hier jeden Sortieralgorithmus verwenden und selbst diese kann man unterschiedlich in Assembler programmieren. Es gibt also keine eindeutige Lösung. Sie können auch ein Sortierverfahren in MiniC programmieren und kompilieren, wenn Sie sich damit schwer tun.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4040/wie-kommen-wir-zu-einer-l%C3%B6sung-dieser-aufgabe?show=4041#a4041</guid>
<pubDate>Tue, 12 Mar 2024 14:52:51 +0000</pubDate>
</item>
<item>
<title>Answered: Guten Abend bitte ich habe eine Frage über unsere übungsblatt 1 aufgabe 3 beim Rosy .</title>
<link>https://q2a.cs.uni-kl.de/4038/guten-abend-bitte-habe-eine-frage-unsere-%C3%BCbungsblatt-aufgabe?show=4039#a4039</link>
<description>Welche Frage haben Sie denn? Sie haben nur die Aufgabe aus dem Übungsblatt kopiert?</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4038/guten-abend-bitte-habe-eine-frage-unsere-%C3%BCbungsblatt-aufgabe?show=4039#a4039</guid>
<pubDate>Mon, 11 Mar 2024 17:55:09 +0000</pubDate>
</item>
<item>
<title>Answered: morgen Bitte noch eine frage uber shannon oder haufmann</title>
<link>https://q2a.cs.uni-kl.de/4034/morgen-bitte-noch-eine-frage-uber-shannon-oder-haufmann?show=4035#a4035</link>
<description>Die Musterlösungen, die bisher in der Klausuren angegeben waren, haben diese Regel leider nicht immer befolgt. Ich habe dies für die Klausuren ab 2020 angepasst, so dass es nun stimmen sollte.&lt;br /&gt;
&lt;br /&gt;
Die Regel, dass die Gruppe von Zeichen mit der höheren Wahrscheinlichkeit die 0 zugewiesen werden sollte, sollte grundsätzlich befolgt werden, um Mehrdeutigkeit zu vermeiden. Wenn Sie das nicht machen, bekommen Sie einen genauso guten Code, und für die Codierung auch ihre Punkte. Allerdings können Sie dann bei der Dekodierung eines Wortes auf Probleme stoßen, da dort diese Regel vorausgesetzt wird.&lt;br /&gt;
&lt;br /&gt;
Eine kleine weitere Schwierigkeit ergibt sich, wenn sich eine Gruppe von Zeichen in zwei Teilmengen mit derselben Wahrscheinlichkeit aufspaltet.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4034/morgen-bitte-noch-eine-frage-uber-shannon-oder-haufmann?show=4035#a4035</guid>
<pubDate>Sun, 18 Feb 2024 10:05:10 +0000</pubDate>
</item>
<item>
<title>Answered: Guten Abend meine frage richtet sich an einer möglicherfehler bei Sequenzielle schaltung</title>
<link>https://q2a.cs.uni-kl.de/4032/guten-abend-richtet-m%C3%B6glicherfehler-sequenzielle-schaltung?show=4033#a4033</link>
<description>Vielen Dank für den Hinweis, das war tatsächlich ein Fehler. Wahrscheinlich wurde dort zuerst ein D-FlipFlop oder etwas anderes ausprobiert. Der Fehler ist nun korrigiert. &lt;br /&gt;
&lt;br /&gt;
Hinweis: Es handelt sich um die DiRa Klausur vom 28. August 2023.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4032/guten-abend-richtet-m%C3%B6glicherfehler-sequenzielle-schaltung?show=4033#a4033</guid>
<pubDate>Sat, 17 Feb 2024 18:07:30 +0000</pubDate>
</item>
<item>
<title>Answered: guten morgen  ich habe eine frage uber die addition von floatingpoint</title>
<link>https://q2a.cs.uni-kl.de/4016/guten-morgen-ich-habe-eine-frage-uber-addition-floatingpoint?show=4017#a4017</link>
<description>Wie lautet denn die Frage?</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/4016/guten-morgen-ich-habe-eine-frage-uber-addition-floatingpoint?show=4017#a4017</guid>
<pubDate>Sun, 04 Feb 2024 15:33:38 +0000</pubDate>
</item>
<item>
<title>Answered: sind diese beiden Shannon-Normalformen identisch?</title>
<link>https://q2a.cs.uni-kl.de/3956/sind-diese-beiden-shannon-normalformen-identisch?show=3957#a3957</link>
<description>&lt;p&gt;Die SNF der Formel a&amp;amp;c&amp;amp;!b&amp;amp;!d|b&amp;amp;c&amp;amp;!d|b&amp;amp;!c&amp;amp;!d|d|!a&amp;amp;!b&amp;amp;!c&amp;amp;!d mit der angegebenen Variablenordnung ist&lt;/p&gt;&lt;pre&gt;    (d?true:(c?(b?true:(a?true:false)):(b?true:(a?false:true))))&lt;/pre&gt;&lt;p&gt;Das ist exakt die erste der beiden Formeln, die zweite hat einige Syntaxfehler und macht so wie sie dasteht keinen Sinn. Ich habe versucht, die Klammern richtig zu setzen, aber die Zahl der Teilterme erlaubt dies nicht.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Die Formel ist nicht zur obigen Formel äquivalent, da SNFs kanonische Normalformen sind und die beiden Formeln syntaktisch nicht identisch sind.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/3956/sind-diese-beiden-shannon-normalformen-identisch?show=3957#a3957</guid>
<pubDate>Fri, 12 Jan 2024 17:20:07 +0000</pubDate>
</item>
<item>
<title>Answered: Logik DiRa SS23</title>
<link>https://q2a.cs.uni-kl.de/3953/logik-dira-ss23?show=3954#a3954</link>
<description>&lt;p&gt;Um die Landkarte mit drei Farben R,G,B einzufärben, verwenden wir Variablen R_i,G_i und B_i für i=0,1,2,3. Aufgrund der Nachbarschaften der Länder muss dabei Folgendes gelten, damit benachbarte Länder unterschiedliche Farben erhalten:&lt;/p&gt;&lt;pre&gt;    (R0-&amp;gt;!R1) &amp;amp; (G0-&amp;gt;!G1) &amp;amp; (B0-&amp;gt;!B1) &amp;amp;
    (R0-&amp;gt;!R2) &amp;amp; (G0-&amp;gt;!G2) &amp;amp; (B0-&amp;gt;!B2) &amp;amp;
    (R1-&amp;gt;!R2) &amp;amp; (G1-&amp;gt;!G2) &amp;amp; (B1-&amp;gt;!B2) &amp;amp;
    (R1-&amp;gt;!R3) &amp;amp; (G1-&amp;gt;!G3) &amp;amp; (B1-&amp;gt;!B3) &amp;amp;
    (R2-&amp;gt;!R3) &amp;amp; (G2-&amp;gt;!G3) &amp;amp; (B2-&amp;gt;!B3)
&lt;/pre&gt;&lt;p&gt;Ferner muss jedes Land eine Farbe bekommen:&lt;/p&gt;&lt;pre&gt;    (R0 | G0 | B0) 
    (R1 | G1 | B1) &amp;amp;
    (R2 | G2 | B2) &amp;amp;
    (R3 | G3 | B3)
&lt;/pre&gt;&lt;p&gt;und jedes Land soll nicht mehr als eine Farbe bekommen:&lt;/p&gt;&lt;pre&gt;    (R0 -&amp;gt; !G0 &amp;amp; !B0) &amp;amp; (G0 -&amp;gt; !R0 &amp;amp; !B0) &amp;amp; (B0 -&amp;gt; !R0 &amp;amp; !G0) &amp;amp;
    (R1 -&amp;gt; !G1 &amp;amp; !B1) &amp;amp; (G1 -&amp;gt; !R1 &amp;amp; !B1) &amp;amp; (B1 -&amp;gt; !R1 &amp;amp; !G1) &amp;amp;
    (R2 -&amp;gt; !G2 &amp;amp; !B2) &amp;amp; (G2 -&amp;gt; !R2 &amp;amp; !B2) &amp;amp; (B2 -&amp;gt; !R2 &amp;amp; !G2) &amp;amp;
    (R3 -&amp;gt; !G3 &amp;amp; !B3) &amp;amp; (G3 -&amp;gt; !R3 &amp;amp; !B3) &amp;amp; (B3 -&amp;gt; !R3 &amp;amp; !G3)
&lt;/pre&gt;&lt;p&gt;Wenn man alle diese Formeln zu einer Konjunktion zusammenfasst, dann entsprechen alle erfüllenden Belegungen den Färbungen der Landkarte. Zum Beispiel kann man einen BDD für diese Formeln bestimmen und daraus alle Färbungen ablesen. Man kann dafür auch andere Formulierungen finden, die zu den obigen Formeln äquivalent sind.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Da die obigen Formeln viele Wiederholungen für alle Länder enthalten, wurde in der Aufgabe nur nach den Einschränkungen für ein Land gefragt, um die Schreibarbeit für alle Länder zu sparen.&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/3953/logik-dira-ss23?show=3954#a3954</guid>
<pubDate>Thu, 11 Jan 2024 14:19:10 +0000</pubDate>
</item>
<item>
<title>Answered: creation of the Shannon-Fano coding in the old exam 2020</title>
<link>https://q2a.cs.uni-kl.de/3949/creation-of-the-shannon-fano-coding-in-the-old-exam-2020?show=3950#a3950</link>
<description>Yes, that is true. The solution had been generated with the former version of the teaching tool which did not follow the remark given in the problem description. Since the remark in the problem description makes sense to define a canonical solution, I have updated the teaching tool accordingly and have also fixed the solution in the exam paper. &lt;br /&gt;
&lt;br /&gt;
Thanks for pointing this out!</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/3949/creation-of-the-shannon-fano-coding-in-the-old-exam-2020?show=3950#a3950</guid>
<pubDate>Tue, 09 Jan 2024 09:26:23 +0000</pubDate>
</item>
<item>
<title>Answered: Convert to CNF</title>
<link>https://q2a.cs.uni-kl.de/2695/convert-to-cnf?show=2696#a2696</link>
<description>&lt;p&gt;First of all, &amp;lt;-&amp;gt; is associative, so that it does not matter for its semantics how we parse a sequence of this operator. According to the lecture, we defined this operator however as being left associative, so that we get the following expression with full use of brackets:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ((((a&amp;amp;d)&amp;lt;-&amp;gt;b)&amp;lt;-&amp;gt;c)|((a&amp;lt;-&amp;gt;a)&amp;amp;!b))&amp;lt;-&amp;gt;!(c&amp;lt;-&amp;gt;(a-&amp;gt;a))&lt;/p&gt;&lt;p&gt;A CNF obtained by the BDD of this formula is for instance the following one:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; (!a|!b|!d) &amp;amp; (b|!c)&lt;/p&gt;&lt;p&gt;Before starting any computation, we first simplify the formula by replacing a&amp;lt;-&amp;gt;a with true and propagating the boolean constants so that we get&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ((((a&amp;amp;d)&amp;lt;-&amp;gt;b)&amp;lt;-&amp;gt;c)|!b)&amp;lt;-&amp;gt;!c&lt;/p&gt;&lt;p&gt;Next, we make a Shannon decomposition: Starting with variable b (it has two occurrences and thus more than variable a), we get the following cofactors:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;b=0: !c&lt;/li&gt;&lt;li&gt;b=1: (a&amp;amp;d&amp;lt;-&amp;gt;c)&amp;lt;-&amp;gt;!c&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Thus, our formula is equivalent to (b -&amp;gt; (a&amp;amp;d&amp;lt;-&amp;gt;c)&amp;lt;-&amp;gt;!c) &amp;amp; (!b -&amp;gt; !c) which yields&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; (!b | ((a&amp;amp;d&amp;lt;-&amp;gt;c)&amp;lt;-&amp;gt;!c)) &amp;amp; (b|!c)&lt;/p&gt;&lt;p&gt;It remains to convert (a&amp;amp;d&amp;lt;-&amp;gt;c)&amp;lt;-&amp;gt;!c) to a CNF, so we make a Shannon decomposition with c:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;c=0: !(a&amp;amp;d)&lt;/li&gt;&lt;li&gt;c=1: !(a&amp;amp;d)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;That makes it simple, since the formula &amp;nbsp;(a&amp;amp;d&amp;lt;-&amp;gt;c)&amp;lt;-&amp;gt;!c) is equivalent to !(a&amp;amp;d). Hence, we get the following formula:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; (!b | !(a&amp;amp;d)) &amp;amp; (b|!c)&lt;/p&gt;&lt;p&gt;which has the following CNF:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; (!b|!a|!d) &amp;amp; (b|!c)&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/2695/convert-to-cnf?show=2696#a2696</guid>
<pubDate>Wed, 08 Jun 2022 07:51:41 +0000</pubDate>
</item>
<item>
<title>Answered: 2018 exam, 2 c)</title>
<link>https://q2a.cs.uni-kl.de/2283/2018-exam-2-c?show=2284#a2284</link>
<description>&lt;p&gt;For the 256 bytes, we need 8-bit addresses. The caches have 32 bytes and a block has 2 bytes, so that each cache has 16 blocks.&amp;nbsp;&lt;/p&gt;&lt;p&gt;The direct mapped cache therefore needs 4 bits for set addresses so that a memory address a[7..0] is split into the tag a[7..5], the set address a[4..1] and the block offset a[0]. The set address&amp;nbsp;a[4..1] is therefore computed as&amp;nbsp;setAdr(adr) := (adr % 32) div 2. We therefore have&lt;/p&gt;&lt;ul&gt;&lt;li&gt;setAdr(30) = 15&lt;/li&gt;&lt;li&gt;setAdr(31) = 15&lt;/li&gt;&lt;li&gt;setAdr(32) = 0&lt;/li&gt;&lt;li&gt;setAdr(33) = 0&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Hence, the set address is 0 and not 16 as you assumed.&amp;nbsp;&lt;/div&gt;&lt;div&gt;For the 4-way set associative cache, we have 4 blocks in a set and therefore each set has 8 bytes, so that the cache has only 4 sets. To that end, we need 2 bits as set addresses, so that a memory address a[7..0] is split into the tag a[7..3], the set address a[2..1] and the block offset a[0]. The set address&amp;nbsp;a[2..1] is therefore computed as&amp;nbsp;setAdr(adr) := (adr % 8) div 2.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/2283/2018-exam-2-c?show=2284#a2284</guid>
<pubDate>Sun, 28 Mar 2021 17:01:36 +0000</pubDate>
</item>
<item>
<title>Answered: Abacus Cache Organisation: Word or Byte adressable?</title>
<link>https://q2a.cs.uni-kl.de/2262/abacus-cache-organisation-word-or-byte-adressable?show=2265#a2265</link>
<description>Abacus is using 16-bit data words, and is addressing a memory with such words also. Hence, each load/store refers to 2 bytes. Don't have doubts on this, unless it is stated otherwise in an exam problem. Some years ago, the version of Abacus of that time was byte-addressed like MIPS and that leads now to some confusions when looking at older exercises.&lt;br /&gt;
&lt;br /&gt;
To avoid this, I have reworked that exam problem completely so that the same computations that were necessary are now to be done for the current version of Abacus. The program used now in the exam also runs in the simulator so that you can verify the given solution.&lt;br /&gt;
&lt;br /&gt;
I hope this helps!</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/2262/abacus-cache-organisation-word-or-byte-adressable?show=2265#a2265</guid>
<pubDate>Sat, 27 Mar 2021 17:20:23 +0000</pubDate>
</item>
<item>
<title>Answered: 17 WS Aufgabe 4 e</title>
<link>https://q2a.cs.uni-kl.de/2259/17-ws-aufgabe-4-e?show=2260#a2260</link>
<description>This is one of the strengths of deterministic parsing. There is unique parse tree that is generated by the parse table for a LL or LR grammar regardless whether that word is accepted or not. The exam problem you are considering is asking for that derivation/parse tree, and the final result whether it was accepting or not.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/2259/17-ws-aufgabe-4-e?show=2260#a2260</guid>
<pubDate>Sat, 27 Mar 2021 08:52:39 +0000</pubDate>
</item>
<item>
<title>Answered: TAC read and write with arrays</title>
<link>https://q2a.cs.uni-kl.de/2256/tac-read-and-write-with-arrays?show=2258#a2258</link>
<description>Yes, that was a kind of a discussion for a while. On the one hand, you can argue that arrays are constants since a statement y[x1] = x2 is mapped to a store instruction sti x2,x1,y where y is a constant and thus only x1 and x2 are read and no variable is written. &lt;br /&gt;
&lt;br /&gt;
On the other hand, from the viewpoint of program analysis, you may argue that y[x1] = x2 is updating the array y if you consider y not just as a base address (as done in the C programming language) and instead consider the value of variable y as being the entire array (as done in the F# programming language for instance).&lt;br /&gt;
&lt;br /&gt;
So, dealing with the array is somehow a matter of taste. It does also not matter since we use that information for the dataflow analysis and that in turn is used for register allocation, and we never assign an array variable to a register (since we map array accesses to load/store instructions with the base address of y as a constant).</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/2256/tac-read-and-write-with-arrays?show=2258#a2258</guid>
<pubDate>Fri, 26 Mar 2021 17:40:09 +0000</pubDate>
</item>
<item>
<title>Answered: rosy Sheet 4 ex. 2</title>
<link>https://q2a.cs.uni-kl.de/2225/rosy-sheet-4-ex-2?show=2229#a2229</link>
<description>&lt;p&gt;Well, you need to understand what the program does and in case of the program you mention, there is no other way that checking step by step what the content of the memory, the cache, and the registers is. Without the simulator that is quite some work, of course.&lt;/p&gt;&lt;p&gt;We have first executed some code such that reg[i]=i holds. Then, we execute the following:&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size:14px&quot;&gt;    sti $1,$0,0     // mem[0] := 1
    sti $2,$0,1     // mem[1] := 2
    ldi $2,$0,1     // reg[2] := mem[1] = 2
    sti $3,$0,2     // mem[2] := 3
    sti $4,$0,3     // mem[3] := 4
    ldi $2,$0,1     // reg[2] := mem[1] = 2
    sti $5,$0,7     // mem[7] := 5
    sti $6,$0,8     // mem[8] := 6
    sti $7,$0,9     // mem[9] := 7
    ldi $2,$0,1     // reg[2] := mem[1] = 2&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;We have a cache with 8 bytes, 2 bytes, i.e., one memory word, in a block and we use direct mapping. Hence, a memory address m is split into its cache address adr(m) = m mod 4 and its tag tag(m) = m div 4. This gives the following execution with memory transactions:&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size:14px&quot;&gt;    sti $1,$0,0     // mem[0] := 1              cache[0] := mem[0]
    sti $2,$0,1     // mem[1] := 2              cache[1] := mem[1]
    ldi $2,$0,1     // reg[2] := mem[1] = 2     
    sti $3,$0,2     // mem[2] := 3              cache[2] := mem[2]
    sti $4,$0,3     // mem[3] := 4              cache[3] := mem[3]
    ldi $2,$0,1     // reg[2] := mem[1] = 2
    sti $5,$0,7     // mem[7] := 5              cache[3] := mem[7]; mem[3] := cache[3]
    sti $6,$0,8     // mem[8] := 6              cache[0] := mem[8]; mem[0] := cache[0]
    sti $7,$0,9     // mem[9] := 7              cache[1] := mem[9]; mem[1] := cache[1]
    ldi $2,$0,1     // reg[2] := mem[1] = 2     cache[1] := mem[1]; mem[9] := cache[1]&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;Note that the following memory addresses refer to the same cache address:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;0,4,8,12&lt;/li&gt;&lt;li&gt;1,5,9,13&lt;/li&gt;&lt;li&gt;2,6,10,14&lt;/li&gt;&lt;li&gt;3,7,11,15&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;After each step, you need to remember the content of the cache, i.e., which memory block is currently at which address in the cache to find out whether there is a hit or a miss and which memory transaction is required. In particular, the last instruction is a miss since at that point of time, there is mem[9] at cache address 1 and we want to load address 1 which is also mapped to the same cache address. Hence, we first have to write back cache address 1 before loading mem[1] into cache[1].&lt;/div&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/2225/rosy-sheet-4-ex-2?show=2229#a2229</guid>
<pubDate>Tue, 23 Mar 2021 19:28:04 +0000</pubDate>
</item>
<item>
<title>Answered: generator matrix</title>
<link>https://q2a.cs.uni-kl.de/1852/generator-matrix?show=1856#a1856</link>
<description>So far we never had exam problem about linear codes, but that does not mean that it is unimportant. I would say that a generator matrix should be given, and you should be able to encode and decode words with it. You may even assume a linear code that is separated so that the construction of the control matrix would be simple. it is then not much more than matrix multiplication, right?</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1852/generator-matrix?show=1856#a1856</guid>
<pubDate>Sun, 23 Aug 2020 18:15:03 +0000</pubDate>
</item>
<item>
<title>Answered: SR flipflop logic minimization</title>
<link>https://q2a.cs.uni-kl.de/1854/sr-flipflop-logic-minimization?show=1855#a1855</link>
<description>&lt;p&gt;To keep it short: That will be no problem.&lt;/p&gt;&lt;p&gt;Side story: There are many rumors about SR-Flipflops which are not true. Consider a typical implementation by two NOR gates:&lt;/p&gt;&lt;pre&gt;        next(p) = !(s | q)
        next(q) = !(r | p)&lt;/pre&gt;&lt;p&gt;This leads to the following cases for the four possible inputs if these are kept stable:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;s=0 &amp;amp; r=0 : (next(p) = !q) &amp;amp; (next(q) = !p)&lt;/li&gt;&lt;li&gt;s=0 &amp;amp; r=1&amp;nbsp;: (next(p) = !q) &amp;amp; (next(q) = 0) and thus&amp;nbsp;(p&amp;nbsp;=1) &amp;amp; (q&amp;nbsp;= 0) after two steps&lt;/li&gt;&lt;li&gt;s=1 &amp;amp; r=0 : (next(p) = 0) &amp;amp; (next(q) = !p) and thus&amp;nbsp;(p&amp;nbsp;=0) &amp;amp; (q&amp;nbsp;= 1) after two steps&lt;/li&gt;&lt;li&gt;s=1&amp;nbsp;&amp;amp; r=1&amp;nbsp;: (next(p) = 0) &amp;amp; (next(q) = 0)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Hence, you can see that s=1&amp;amp;r=1 do not lead to unstable outputs as often stated, but they violate the invariant that we want that q=!p. That is established by one of the inputs s=0&amp;amp;r=1 or s=1&amp;amp;r=0 and kept invariant by s=0&amp;amp;r=0. However, if we would have once the input s=1&amp;amp;r=1 which makes p=q=0, then the input s=0&amp;amp;r=0 would lead to an unstable state where p and q will oscillate.&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can look at is also from the perspective of the states&lt;/p&gt;&lt;ol&gt;&lt;li&gt;p=0 &amp;amp; q=0 :&amp;nbsp;(next(p) = !s) &amp;amp; (next(q) = !r), i.e. all four states are reachable from here&lt;/li&gt;&lt;li&gt;p=0 &amp;amp; q=1 :&amp;nbsp;(next(p) = 0) &amp;amp; (next(q) = !r), i.e. with r=1 we switch to p=q=0 and otherwise remain in&amp;nbsp;p=0 &amp;amp; q=1&lt;/li&gt;&lt;li&gt;p=1 &amp;amp; q=0 :&amp;nbsp;(next(p) = !s) &amp;amp; (next(q) = 0), i.e. with s=1 we switch to p=q=0 and otherwise remain in&amp;nbsp;p=1 &amp;amp; q=0&lt;/li&gt;&lt;li&gt;p=1 &amp;amp; q=1 :&amp;nbsp;(next(p) = 0) &amp;amp; (next(q) = 0), i.e. we switch to p=q=0&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;img alt=&quot;&quot; src=&quot;https://q2a.cs.uni-kl.de/?qa=blob&amp;amp;qa_blobid=8018716056139149349&quot; style=&quot;height:144px; width:300px&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;As you can see, it is unavoidable to go through state p=q=0.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Having written way too much, let me emphasize here finally, that all of this is not relevant for the exam tomorrow. I don't want to create the impression that this is maybe something you should look at in detail. Please don't waste your time!&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1854/sr-flipflop-logic-minimization?show=1855#a1855</guid>
<pubDate>Sun, 23 Aug 2020 18:10:42 +0000</pubDate>
</item>
<item>
<title>Answered: CNF/DNF or CCNF/CDNF</title>
<link>https://q2a.cs.uni-kl.de/1850/cnf-dnf-or-ccnf-cdnf?show=1851#a1851</link>
<description>If the exercise asks for CNF / DNF only, then the canonical-CNF / -DNF as well as the minial-CNF / -DNF and anything in between is ok.&lt;br /&gt;
&lt;br /&gt;
CNF / DNF only means that we need a conjunction of disjunctions of literals / a disjunction of conjunction of literals respectively, but size does not matter for that.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1850/cnf-dnf-or-ccnf-cdnf?show=1851#a1851</guid>
<pubDate>Sun, 23 Aug 2020 17:00:21 +0000</pubDate>
</item>
<item>
<title>Answered: Huffman Coding ws14 ex.1g)</title>
<link>https://q2a.cs.uni-kl.de/1844/huffman-coding-ws14-ex-1g?show=1845#a1845</link>
<description>There is more than one correct solution. In the example, we have probabilities (E,0.5);(O,0.125);(S,0.125);(U,0.10);(L,0.05);(N,0.05);(G,0.05) and Huffman encoding is based on a sorting of the letters according to their probabilities. As there are some letters with the same probabilities, you can sort differently and this way you get different codes. Their average number of bits per symbol should however be the same, even though for certain symbols you will have different number of bits. For example, for L,N,G two will have five bits and one of them just four, which one does not matter for the average number of bits per symbol, but of course for the particular encoding it matters.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1844/huffman-coding-ws14-ex-1g?show=1845#a1845</guid>
<pubDate>Sun, 23 Aug 2020 15:32:51 +0000</pubDate>
</item>
<item>
<title>Answered: B Complement Multiplication</title>
<link>https://q2a.cs.uni-kl.de/1828/b-complement-multiplication?show=1832#a1832</link>
<description>&lt;p&gt;I ran the program IntMultCRACRA with your inputs &amp;lt;7306&amp;gt;12 * &amp;lt;A0A2&amp;gt;12 and got the following partial products that have to be summed up to obtain the shown product:&lt;/p&gt;&lt;pre&gt;                B   0   5   1   0   // pp[0][4..0]
            B   B   0   5   1       // pp[1][4..0]
        B   6   1   6   B           // pp[2][4..0]
    0   9   1   A   8               // pp[3][4..0]
    -------------------------------
    0   9   1   A   8   B   1   0   // p[7..0]    &lt;/pre&gt;&lt;p&gt;Computation of the partial products:&lt;/p&gt;&lt;pre&gt;    &amp;lt;7306&amp;gt;12 * A = &amp;lt;B,0,5,1,0&amp;gt;12
    &amp;lt;7306&amp;gt;12 * 0 + &amp;lt;B,0,5,1&amp;gt;12 = &amp;lt;B,B,0,5,1&amp;gt;12
    &amp;lt;7306&amp;gt;12 * A + &amp;lt;B,B,0,5&amp;gt;12 = &amp;lt;B,6,1,6,B&amp;gt;12
    &amp;lt;7306&amp;gt;12 * 2 + &amp;lt;B,6,1,6&amp;gt;12 = &amp;lt;0,9,1,A,8&amp;gt;12
&lt;/pre&gt;&lt;p&gt;About the red rectangle: You have to apply function alpha when you reach the most significant digits, i.e., in your red rectangle where we have i=1 and j=3=N-1, you have to compute the following&lt;/p&gt;&lt;pre&gt;    sm = xin * yin + pin + cin
       = x[1] * alpha(y[3]) + alpha(pp[0][4]) + cp[1][2]
       = 0 * alpha(7) + alpha(B) + 0
       = 0 * alpha(7) + alpha(B)
       = (11&amp;lt;(12/2) ? +x : +11-12)
       = +11-12
       = -1
&lt;/pre&gt;&lt;p&gt;and with this, you obtain&lt;/p&gt;&lt;pre&gt;    cp[1][3] = -1
    pp[1][3] = 11
    pp[1][4] = gamma(-1) = 11
&lt;/pre&gt;&lt;p&gt;About the green rectangle: Here we have i=3=M-1 and j=3=N-1, and we therefore compute&lt;/p&gt;&lt;pre&gt;    sm = xin * yin + pin + cin
       = alpha(x[3]) * alpha(y[3]) + alpha(pp[2][4]) + cp[3][2]
       = alpha(7) * alpha(A) + alpha(B) + 0
       = alpha(7) * alpha(A) + alpha(B) + 0
       = -5 * -2 + -1 + 0
       = 10 + -1 + 0
       = 9
&lt;/pre&gt;&lt;p&gt;and with this, you obtain&lt;/p&gt;&lt;pre&gt;    cp[3][3] = 0
    pp[3][3] = 9
    pp[3][4] = gamma(0) = 0
&lt;/pre&gt;&lt;p&gt;recall&amp;nbsp;&lt;/p&gt;&lt;pre&gt;    alpha(x) = (x&amp;lt;(Base/2) ? +x : +x-Base);
    gamma(y) = (y&amp;lt;0 ? y+Base : y);&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Does this help?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1828/b-complement-multiplication?show=1832#a1832</guid>
<pubDate>Sun, 23 Aug 2020 13:45:41 +0000</pubDate>
</item>
<item>
<title>Answered: Rounding methods</title>
<link>https://q2a.cs.uni-kl.de/1826/rounding-methods?show=1827#a1827</link>
<description>&lt;p&gt;I don't see a mistake in the slides, let's check some examples:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;ceil(1.0-0.5) = ceil(0.5) = 1.0&lt;/li&gt;&lt;li&gt;ceil(1.4-0.5) = ceil(0.9) = 1.0&lt;/li&gt;&lt;li&gt;ceil(1.5-0.5) = ceil(1.0) = 1.0&lt;/li&gt;&lt;li&gt;ceil(1.6-0.5) = ceil(1.1) = 2.0&lt;/li&gt;&lt;li&gt;ceil(2.0-0.5) = ceil(1.5) = 2.0&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;About cornercases: these are the numbers which are exactly in between two integers like x=1.5 (and not x=2.0). For those numbers n+0.5, we obtain ceil(n+0.5-0.5) = ceil(n) = n which means that we are rounding downwards, right?&lt;/div&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1826/rounding-methods?show=1827#a1827</guid>
<pubDate>Sun, 23 Aug 2020 11:57:30 +0000</pubDate>
</item>
<item>
<title>Answered: DNF ex.4 ws17</title>
<link>https://q2a.cs.uni-kl.de/1820/dnf-ex-4-ws17?show=1821#a1821</link>
<description>&lt;p&gt;I think both is correct, note the the DNF is not a canonical normal form without further restrictions. You can&amp;nbsp;verify the following equivalences:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;((a-&amp;gt;b) ∧ (c∨a∨¬b)) &amp;lt;-&amp;gt; (¬a∧¬b ∨ a∧b ∨ ¬a∧c)&lt;/li&gt;&lt;li&gt;((a-&amp;gt;b) ∧ (c∨a∨¬b)) &amp;lt;-&amp;gt; (¬a∧¬b ∨ ¬a∧b∧c ∨ a∧b)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It is a matter of logic minimization. The function has even two minimal DNFs which are&lt;/p&gt;&lt;ul style=&quot;box-sizing:border-box; font-family:OpenSans,Arial,sans-serif; font-size:14.000000953674316px; list-style-position:outside; margin-bottom:10px; margin-top:0px; padding-left:1.2em; padding-right:0px&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;!a&amp;amp;!b|a&amp;amp;b|b&amp;amp;c&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;!a&amp;amp;!b|a&amp;amp;b|!a&amp;amp;c&lt;/li&gt;&lt;/ul&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1820/dnf-ex-4-ws17?show=1821#a1821</guid>
<pubDate>Sun, 23 Aug 2020 10:51:29 +0000</pubDate>
</item>
<item>
<title>Answered: Floating point conversion</title>
<link>https://q2a.cs.uni-kl.de/1804/floating-point-conversion?show=1805#a1805</link>
<description>&lt;p&gt;I think the best way to do this is as follows which is without remembering many complicated formulas:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Normalize the given number in that you haven/double it until the mantissa is between 1 and 2 while maintaining a product with a power of 2. Example: 0.2 = 0.2*2^0 =&amp;nbsp;0.4*2^{-1}&amp;nbsp;=&amp;nbsp;0.8*2^{-2}&amp;nbsp;=&amp;nbsp;1.6*2^{-3}&lt;/li&gt;&lt;li&gt;Convert the mantissa to radix 2: 1.6 = 1 + 1/2 + 1/16 + 1/32 + epsilon, i.e., &lt;span style=&quot;color:#2980b9&quot;&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;span style=&quot;font-family:Menlo,Monaco,Consolas,&amp;quot;Courier New&amp;quot;,monospace; font-size:13px&quot;&gt;.&lt;/span&gt;&lt;strong&gt;1001&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color:#e74c3c&quot;&gt;1&lt;/span&gt; + &lt;span style=&quot;color:#27ae60&quot;&gt;eps;&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;if you need four bits, compute five here (which is the additional red one called the rounding bit).&lt;/li&gt;&lt;li&gt;Consider the two representable numbers less and greater than the given number; in the example, these are&amp;nbsp;1.1001_2 * 2^{-3} and 1.1010_2 * 2^{-3}. Which is the nearest number? This is easily seen as follows: if eps=0, then and the red digit is 1, we are exactly in the middle between two representable numbers, otherwise a red 1 tend to the upper number, and 0 to the lower one. Tie breaking is needed in case of the middle case which is done according to the rounding modes.&lt;/li&gt;&lt;li&gt;Rest depends on the rounding mode and whether you have a special case (denormal number, overflow, etc).&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Does this help? Read also the answer to&amp;nbsp;&lt;a href=&quot;https://q2a.cs.uni-kl.de/1697/conversion-to-resyfloat-if-x-1&quot; rel=&quot;nofollow&quot;&gt;https://q2a.cs.uni-kl.de/1697/conversion-to-resyfloat-if-x-1&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1804/floating-point-conversion?show=1805#a1805</guid>
<pubDate>Sat, 22 Aug 2020 20:27:34 +0000</pubDate>
</item>
<item>
<title>Answered: FSM Regulations in the exam</title>
<link>https://q2a.cs.uni-kl.de/1798/fsm-regulations-in-the-exam?show=1801#a1801</link>
<description>I am not sure what you mean with zero/null states (Müllzustände). Are these unreachable states, or states from where we cannot reach the final states? If you mean that, the answer depends on what the exercise is about. If you have to have a deterministic automaton, you probably need these states to maintain the determinism (or you have to minimize the automaton since these states are useless). Otherwise, it may be okay to drop them.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1798/fsm-regulations-in-the-exam?show=1801#a1801</guid>
<pubDate>Sat, 22 Aug 2020 19:07:28 +0000</pubDate>
</item>
<item>
<title>Answered: BDD: ws17 exercise 5 mistake + apply algorithm</title>
<link>https://q2a.cs.uni-kl.de/1789/bdd-ws17-exercise-5-mistake-apply-algorithm?show=1799#a1799</link>
<description>&lt;p&gt;So, I guess the first question is already answered if it was a wrong use of the operator precedences: XOR binds stronger than implication. If you have doubts about something like this, please ask in exams.&lt;/p&gt;&lt;p&gt;For problem 5c, one should compute the conjunction of BDDs for&amp;nbsp;((a∧¬b)∨c) and&amp;nbsp;a∧b∧¬d&amp;nbsp;∨&amp;nbsp;¬a which should produce the following BDDs:&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://q2a.cs.uni-kl.de/?qa=blob&amp;amp;qa_blobid=9397875491005437398&quot; style=&quot;height:277px; width:150px&quot;&gt;&amp;nbsp; &amp;amp;&amp;nbsp;&lt;img alt=&quot;&quot; src=&quot;https://q2a.cs.uni-kl.de/?qa=blob&amp;amp;qa_blobid=5250578132415861464&quot; style=&quot;height:262px; width:150px&quot;&gt;&amp;nbsp;= &amp;nbsp;&amp;nbsp;&lt;img alt=&quot;&quot; src=&quot;https://q2a.cs.uni-kl.de/?qa=blob&amp;amp;qa_blobid=7634766164069946370&quot; style=&quot;height:272px; width:150px&quot;&gt;&lt;/p&gt;&lt;p&gt;Note that the ordering is given and therefore c must occur before d on the paths.&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1789/bdd-ws17-exercise-5-mistake-apply-algorithm?show=1799#a1799</guid>
<pubDate>Sat, 22 Aug 2020 18:59:41 +0000</pubDate>
</item>
<item>
<title>Answered: Floating Point Arithmetic</title>
<link>https://q2a.cs.uni-kl.de/1743/floating-point-arithmetic?show=1745#a1745</link>
<description>For floating point numbers, you mainly need to be able to convert given numbers from and to floating point format. Performing arithmetic operations on floating point numbers is quite involved, and we usually don't do that in the exam. You should however know how that works in principle, i.e., that we need to adapt the exponents for addition/subtraction, and so on. Performing that in detail is however quite involved since rounding is required at the right steps etc. Bytheway, hardware implementations for the &amp;quot;full&amp;quot; IEEE754 standard are still not everywhere used since it is so complicated.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1743/floating-point-arithmetic?show=1745#a1745</guid>
<pubDate>Fri, 21 Aug 2020 13:42:30 +0000</pubDate>
</item>
<item>
<title>Answered: Korrekter Rechenweg</title>
<link>https://q2a.cs.uni-kl.de/1725/korrekter-rechenweg?show=1726#a1726</link>
<description>Ja, das ist okay.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1725/korrekter-rechenweg?show=1726#a1726</guid>
<pubDate>Fri, 21 Aug 2020 07:29:24 +0000</pubDate>
</item>
<item>
<title>Answered: What is a BDD(0)?</title>
<link>https://q2a.cs.uni-kl.de/1704/what-is-a-bdd-0?show=1705#a1705</link>
<description>It refers to the False/True leaves. BDD(0) = False-leaf. BDD(1) = True-leaf.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1704/what-is-a-bdd-0?show=1705#a1705</guid>
<pubDate>Thu, 20 Aug 2020 17:20:16 +0000</pubDate>
</item>
<item>
<title>Answered: Conversion to ReSyFloat if |x|&lt;1</title>
<link>https://q2a.cs.uni-kl.de/1697/conversion-to-resyfloat-if-x-1?show=1702#a1702</link>
<description>&lt;p&gt;Let's convert 0.2 to a floating point number with 4 bits for the mantissa and three bits for the exponent. First, let's consider what the teaching tool does.&amp;nbsp;&lt;/p&gt;&lt;p&gt;To describe the input, we have to specify the number as a quotient of integers, e.g., 2/10. The tool first translates these two numbers to radix-2 numbers and reads it as &amp;lt;10&amp;gt;_2 / &amp;lt;1010&amp;gt;_2. It realizes that it needs to scale the division by a factor of 2^7, i.e., to compute +&amp;lt;100000000&amp;gt;_2 / &amp;lt;1010&amp;gt;_2 * 2^{-7} to have sufficiently many digits for the mantissa when doing an integer division. The result of this integer division is now&amp;nbsp;&lt;/p&gt;&lt;pre&gt;+&amp;lt;1.&lt;span style=&quot;color:#2980b9&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color:#e74c3c&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#16a085&quot;&gt;...0/1...&lt;/span&gt;&amp;gt;_2 * 2^{-3}&lt;/pre&gt;&lt;p&gt;The meaning of this is as follows: the mantissa is normalized (as you can see it starts with a 1 left of the decimal point). The next three digits given in blue color will be our remaining bits for the mantissa. The next bit given in red color is called the &lt;em&gt;rounding bit&lt;/em&gt;; it would be the next bit after our mantissa, and finally the 0/1 given in green color will tell us whether there are futher 1 digits after this one (this is known by the integer division +&amp;lt;100000000&amp;gt;_2 / &amp;lt;1010&amp;gt;_2 by checking the remainder). Sometimes people call the green part the sticky bit in that they provide a bit which is 1 if there are further 1 bits and 0 otherwise.&lt;/p&gt;&lt;p&gt;Now, we either have to choose one of the representable numbers +&amp;lt;1.100&amp;gt;_2 * 2^{-3} or +&amp;lt;1.101&amp;gt;_2 * 2^{-3} since our actual number 0.2 = +&amp;lt;1.1001...0/1...&amp;gt;_2 * 2^{-3} cannot be precisely represented. Which one of the two is chosen depends on the rounding mode, and there we have to consider three cases:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;In case the rounding bit would be 0, then the number would be closer to +&amp;lt;1.100&amp;gt;_2 * 2{-3}.&amp;nbsp;&lt;/li&gt;&lt;li&gt;However, as the rounding bit is 1, and there are further 1-bits after this (the green ones), our number is closer to +&amp;lt;1.101&amp;gt;_2 * 2{-3}.&amp;nbsp;&lt;/li&gt;&lt;li&gt;There could also be the third case, where the rounding bit is 1, and there are no further green bits on the right. In that case, the number would be right in the middle of the representable numbers +&amp;lt;1.100&amp;gt;_2 * 2{-3} and +&amp;lt;1.101&amp;gt;_2 * 2{-3}.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The table that follows in the output of the teaching tool tells you the numbers chosen for the different rounding modes.&amp;nbsp;&lt;/p&gt;&lt;p&gt;If we would like to use a hidden bit, we should specify one further bit for the teaching tool, and the omit the leading 1 of the mantissa as the hidden bit.&amp;nbsp;&lt;/p&gt;&lt;p&gt;When are denormal numbers used? They are used when the exponent becomes zero. In that case, we cannot reduce the exponent further to scale the mantissa, and we have to live with a mantissa that is not normalized. Recall that normalizing means that the mantissa is between 1 and 2, i.e., in binary 1.xxxxx. If that cannot be achieved with the exponents that we have, you need to represent the number as a denormal number (or it is an overflow).&lt;/p&gt;&lt;p&gt;Looking at the slides 23-26, you need to compute it as follows:&amp;nbsp;First, normalize the number, i.e., represent it as M*2^{E} such that 1≤M&amp;lt;2 holds. In our case, we get&lt;/p&gt;&lt;pre&gt;    0.2 = 0.4 * 2^{-1} = 0.8 * 2^{-2} = 1.6 * 2^{-3}&lt;/pre&gt;&lt;p&gt;So, we have M = 1.6 and E = -3. With 3 bits for the exponent, we obtain the offet beta .= (2^{3}-1)/2 = 3. Hence, E+beta = -3+3 = 0, and the exponent that we should use is 0, so we will have a denormalize number (indicated by exponent 0).&lt;/p&gt;&lt;p&gt;Now note that 1.6 = 1 + 1/2 + 1/16 + ... which gives us the same information as mentioned above, i.e.&amp;nbsp;&lt;/p&gt;&lt;pre&gt;+&amp;lt;1.&lt;span style=&quot;color:#2980b9&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color:#e74c3c&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#16a085&quot;&gt;...0/1...&lt;/span&gt;&amp;gt;_2 * 2^{-3}&lt;/pre&gt;&lt;div&gt;The rest can be explained as before.&lt;/div&gt;&lt;p&gt;Does it help?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1697/conversion-to-resyfloat-if-x-1?show=1702#a1702</guid>
<pubDate>Thu, 20 Aug 2020 17:02:26 +0000</pubDate>
</item>
<item>
<title>Answered: Compose Algorithm ITE</title>
<link>https://q2a.cs.uni-kl.de/1683/compose-algorithm-ite?show=1686#a1686</link>
<description>&lt;p&gt;Yes, you can use the ITE algorithm with three BDDs as operands. That is the core problem solved by the ITE algorithm. Once you have figured out the three BDDs which are the operands of the ITE algorithm, then you simple follow the steps of the ITE algorithm:&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://q2a.cs.uni-kl.de/?qa=blob&amp;amp;qa_blobid=17470111341363177957&quot; style=&quot;height:212px; width:450px&quot;&gt;&lt;/p&gt;&lt;p&gt;Maybe I don't understand what your problem there is?&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1683/compose-algorithm-ite?show=1686#a1686</guid>
<pubDate>Thu, 20 Aug 2020 09:31:53 +0000</pubDate>
</item>
<item>
<title>Answered: Operator Base for XOR and AND</title>
<link>https://q2a.cs.uni-kl.de/1663/operator-base-for-xor-and-and?show=1666#a1666</link>
<description>&lt;p&gt;¬a = a&amp;nbsp;&lt;span style=&quot;font-size:14px&quot;&gt;⊕ 1&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:14px&quot;&gt;Using other notation,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size:14px&quot;&gt;not a = a xor 1&lt;/span&gt;&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1663/operator-base-for-xor-and-and?show=1666#a1666</guid>
<pubDate>Wed, 19 Aug 2020 10:16:58 +0000</pubDate>
</item>
<item>
<title>Answered: Question on exam WS17, 3b</title>
<link>https://q2a.cs.uni-kl.de/1629/question-on-exam-ws17-3b?show=1632#a1632</link>
<description>Yes, we do not carefully distinguish between overflow and NaN (IEEE 754 does that very carefully). You are right that the problem is rather an overflow, what the teaching tool wants to express is that this number cannot be represented.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1629/question-on-exam-ws17-3b?show=1632#a1632</guid>
<pubDate>Tue, 18 Aug 2020 12:39:58 +0000</pubDate>
</item>
<item>
<title>Answered: Exist Algorithm</title>
<link>https://q2a.cs.uni-kl.de/1621/exist-algorithm?show=1626#a1626</link>
<description>&lt;p&gt;In general, boolean quantification is defined as follows:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;∃x. Phi := Phi[x&amp;lt;-0] ⋁ Phi[x&amp;lt;-1]&lt;/li&gt;&lt;li&gt;∀x. Phi := Phi[x&amp;lt;-0] ∧ Phi[x&amp;lt;-1]&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;In case of existential quantification, it says that Phi holds for some variable assignment where we don't care about the value of x (whether it is either 0 or 1) in the sense that at lease of the values 0,1 for x will extend the variable assignment to satisfy Phi. In case of the universal quantification it says that there must be an assignment for&amp;nbsp;the rest of the variables so that assigning both values x&amp;lt;-0 and&amp;nbsp;value x&amp;lt;-1 (one at a time, of course)&amp;nbsp;will both satisfy the formula.&lt;/div&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1621/exist-algorithm?show=1626#a1626</guid>
<pubDate>Tue, 18 Aug 2020 10:41:43 +0000</pubDate>
</item>
<item>
<title>Answered: DNF determination</title>
<link>https://q2a.cs.uni-kl.de/1619/dnf-determination?show=1625#a1625</link>
<description>There are many ways: Truth tables are certainly one, but that one is always an exponential-size effort. Another approach is to compute a ROBDD, and then to enumerate the paths from the root node to the 1-leaf; each path is a conjunction of possibly negated variables and denotes a variable assignment. Using a disjunction of the paths gives you another DNF. &amp;nbsp;And there is also the way to use Boolean algebra to rewrite a given formula to DNF which is also sometimes a fast solution. Yet another way is to compute the CNF of the negation, and to negate that again to make it a DNF.&lt;br /&gt;
&lt;br /&gt;
In general, there is no best way, it always depends on the given formulas.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1619/dnf-determination?show=1625#a1625</guid>
<pubDate>Tue, 18 Aug 2020 10:36:14 +0000</pubDate>
</item>
<item>
<title>Answered: Compose Algorithm</title>
<link>https://q2a.cs.uni-kl.de/1571/compose-algorithm?show=1572#a1572</link>
<description>&lt;p&gt;There are again multiple steps happening at once. If we simply follow the algorithm, then the &lt;strong&gt;b&lt;/strong&gt; node is &lt;em&gt;&quot;pulled up&quot;&lt;/em&gt; and the Compose-Node goes down one level. Once phi is only &lt;strong&gt;True&lt;/strong&gt; or &lt;strong&gt;False&lt;/strong&gt; case 1 (from your question) applies.&lt;/p&gt;&lt;p&gt;Here we can see this directly, because &lt;strong&gt;a&lt;/strong&gt; does not occur in phi. Therefore case 2 will never apply. We will simply go down recursively until finally case 1 applies. Intuitively: We want to replace &lt;strong&gt;a&lt;/strong&gt;. &lt;strong&gt;a&lt;/strong&gt; does not occur in phi. Therefore we leave phi as it is.&lt;/p&gt;&lt;p&gt;This is a shortcut that is easy to see for humans, and you are allowed to do that in the exam (but better write a comment next to it). The computer can't see that since it only goes through the tree node by node and does not have an &lt;em&gt;&quot;overview&quot;&lt;/em&gt;.&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1571/compose-algorithm?show=1572#a1572</guid>
<pubDate>Mon, 17 Aug 2020 16:22:38 +0000</pubDate>
</item>
<item>
<title>Answered: Exist Algorithm</title>
<link>https://q2a.cs.uni-kl.de/1544/exist-algorithm?show=1546#a1546</link>
<description>You are right. On the left side, two steps are happening at once.&lt;br /&gt;
&lt;br /&gt;
We look at the left and right child of the left exists-node. We see c &amp;gt; b, and therefore we can remove c (c can not occur in the right child, since it's ordered). Now both children of the exists-node are b and we can apply the same case as on the right side.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1544/exist-algorithm?show=1546#a1546</guid>
<pubDate>Mon, 17 Aug 2020 10:07:39 +0000</pubDate>
</item>
<item>
<title>Answered: Questions about exam exercises</title>
<link>https://q2a.cs.uni-kl.de/1537/questions-about-exam-exercises?show=1538#a1538</link>
<description>&lt;p&gt;Answers for the DiRa exam in SS20:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;If the output character is seen in the state, yes, since then that information is redundant. I guess that is what you have in mind. However, if the states would be called 0,1,2,... then some information would be missing, right?&lt;/li&gt;&lt;li&gt;Linear clause forms are of outmost importance for SAT solving; SAT solving&amp;nbsp;is of outmost importance for verification; verification is of outmost importance for digital circuit design; so yes, it is required!&lt;/li&gt;&lt;li&gt;No, we exclude the case where the basis is an odd number. In general, it is possible to have odd numbers as bases, but then the algorithms sometimes need another special case. We exclude that since the bases used in circuit design are mostly powers of two and thus even numbers.&amp;nbsp;&lt;/li&gt;&lt;li&gt;That is definitely no problem, and we even allow pocket calculators. However, because of that, be prepared that we might ask for a number conversion to base 7 which you don't find on pocket calculators.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1537/questions-about-exam-exercises?show=1538#a1538</guid>
<pubDate>Sun, 16 Aug 2020 18:44:27 +0000</pubDate>
</item>
<item>
<title>Answered: Questions about exam</title>
<link>https://q2a.cs.uni-kl.de/1524/questions-about-exam?show=1525#a1525</link>
<description>Here are my answers:&lt;br /&gt;
&lt;br /&gt;
(1+2) You do not need all points to get a 1.0. You can see with the published grade table that at that time 90 points were required for the 1.0, and the exam had 125 points in total. So, you roughly need 75% of the points. &lt;br /&gt;
&lt;br /&gt;
(3) If we find adjacent cubes, i.e., cubes that only differ by exactly one variable, then their disjunction is equivalent to the infimum of these cubes. Both the disjunction and the infimum are commutative and associative operations, so C_(1,2,3,4) and C_(1,3,2,4) are the same and you just need to compute one. That is why for each column in the Quine table, you just need to scan the other cubes below it to compute new cubes for the next column.&lt;br /&gt;
&lt;br /&gt;
(4) Yes, the two columns are exchanged!&lt;br /&gt;
&lt;br /&gt;
(5) You mean the solutions of the exam in SS15. No, we have not made solutions for that, sorry.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1524/questions-about-exam?show=1525#a1525</guid>
<pubDate>Sun, 16 Aug 2020 11:21:10 +0000</pubDate>
</item>
<item>
<title>Answered: Is a calculator allowed on the exam?</title>
<link>https://q2a.cs.uni-kl.de/1454/is-a-calculator-allowed-on-the-exam?show=1455#a1455</link>
<description>see &lt;a href=&quot;https://q2a.cs.uni-kl.de/1429/can-we-use-a-calculator-for-the-dira-exam&quot; rel=&quot;nofollow&quot;&gt;https://q2a.cs.uni-kl.de/1429/can-we-use-a-calculator-for-the-dira-exam&lt;/a&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1454/is-a-calculator-allowed-on-the-exam?show=1455#a1455</guid>
<pubDate>Fri, 14 Aug 2020 12:01:54 +0000</pubDate>
</item>
<item>
<title>Answered: Boolean Algebra proof SAT and VALID</title>
<link>https://q2a.cs.uni-kl.de/1237/boolean-algebra-proof-sat-and-valid?show=1245#a1245</link>
<description>&lt;p&gt;What about this solution:&lt;/p&gt;&lt;pre&gt;    ((¬a ∨ a) ↔ (b ∨ a)) → (¬((¬a ∨ b) ∧ a) ↔ a ⊕ b)
    = (1 ↔ (b ∨ a)) → (¬((¬a ∨ b) ∧ a) ↔ a ⊕ b)
    = (b ∨ a) → ((¬((¬a ∨ b) ∧ a) ↔ a) ⊕ b)
    = (b ∨ a) → ((¬((¬a ∨ b) ∧ a) ∧ a ∨ ((¬a ∨ b) ∧ a) ∧ ¬a) ⊕ b)
    = (b ∨ a) → ((¬((¬1 ∨ b) ∧ 1) ∧ a ∨ ((¬0 ∨ b) ∧ 0) ∧ ¬a) ⊕ b)
    = (b ∨ a) → ((¬b ∧ a) ⊕ b)
    = (b ∨ a) → ((¬b ∧ a) ∧ ¬b ∨ ¬(¬b ∧ a) ∧ b)
    = (b ∨ a) → ((1 ∧ a) ∧ ¬b ∨ ¬(¬1 ∧ a) ∧ b)
    = (b ∨ a) → (a ∧ ¬b ∨ ¬0 ∧ b)
    = (b ∨ a) → (a ∧ ¬b ∨ b)
    = (b ∨ a) → (a ∨ b)
    = ¬(b ∨ a) ∨ (a ∨ b)
    = ¬(a ∨ b) ∨ (a ∨ b)
    = 1&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1237/boolean-algebra-proof-sat-and-valid?show=1245#a1245</guid>
<pubDate>Mon, 03 Aug 2020 13:49:31 +0000</pubDate>
</item>
<item>
<title>Answered: wordlength arithmetic encoding</title>
<link>https://q2a.cs.uni-kl.de/1210/wordlength-arithmetic-encoding?show=1212#a1212</link>
<description>&lt;p&gt;Yes you are right. When we decode &lt;em&gt;0.66&lt;/em&gt;, we first identify that in the start interval &lt;em&gt;[0.0,1.0]&lt;/em&gt;, it belongs to &lt;strong&gt;B&lt;/strong&gt;'s sub-interval &lt;em&gt;[0.6,0.8]&lt;/em&gt; (see first line in figure). Then in the interval &lt;em&gt;[0.6,0.8]&lt;/em&gt;, we identify that encoding &lt;em&gt;0.66&lt;/em&gt; belongs to &lt;strong&gt;A&lt;/strong&gt;'s sub-interval &lt;em&gt;[0.6,0.72]&lt;/em&gt;&amp;nbsp; (second line in figure). Then in the interval &lt;em&gt;[0.6,0.72]&lt;/em&gt;, we narrow down &lt;em&gt;0.66&lt;/em&gt; to &lt;strong&gt;A&lt;/strong&gt;'s sub-interval &lt;em&gt;[0.6,0.672]&lt;/em&gt; (third line in figure). Continuing similarly, in the interval &lt;em&gt;[0.6,0.672]&lt;/em&gt;, encoding &lt;em&gt;0.66&lt;/em&gt; belongs to &lt;strong&gt;C&lt;/strong&gt;'s sub-interval &lt;em&gt;[0.6576,0.672]&lt;/em&gt; (fourth line in figure). As you can see, we may continue decoding like this forever since the number &lt;em&gt;0.66&lt;/em&gt; will always belong to one of the sub-intervals.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;https://q2a.cs.uni-kl.de/?qa=blob&amp;amp;qa_blobid=4431994567902197712&quot; style=&quot;height:503px; width:550px&quot;&gt;&lt;/p&gt;&lt;p&gt;It is therefore necessary to inform the decoder when to stop. This can be done in a few ways. One way would be to use a special symbol as end-of-data. For instance, if symbol &lt;strong&gt;C&lt;/strong&gt; is used in the above example to indicate end-of-data, the decoded word would be &lt;strong&gt;BAAC&lt;/strong&gt;. Another way would be to specify total number of symbols in the word. For instance, if total number of symbols is specified as &lt;em&gt;5&lt;/em&gt; in the above example, then the decoded word would be &lt;strong&gt;BAACA&lt;/strong&gt;. In this case, there would be a fifth line in the above figure indicating that in the interval &lt;em&gt;[0.6576,0.672]&lt;/em&gt;, the encoding &lt;em&gt;0.66&lt;/em&gt; belongs to &lt;strong&gt;A&lt;/strong&gt;'s sub-interval &lt;em&gt;[0.6576,0.66624]&lt;/em&gt;.&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1210/wordlength-arithmetic-encoding?show=1212#a1212</guid>
<pubDate>Sun, 26 Jul 2020 11:06:35 +0000</pubDate>
</item>
<item>
<title>Answered: DiRa last chapters Processor Architecture + MIPS</title>
<link>https://q2a.cs.uni-kl.de/1203/dira-last-chapters-processor-architecture-mips?show=1206#a1206</link>
<description>They are relevant for the exam, but maybe not the most important topics. They are also an outlook on the RoSy lecture where processor architecture and system software are in the focus. The two lectures are connected by using digital circuit design (which is the major focus of DiRa) for the design of processors. &lt;br /&gt;
&lt;br /&gt;
What is needed for the DiRa exam of this chapter? Well, we do not really discuss the micro architecture of processors, i.e., the circuit design, but just the macro architecture, which means the instruction set. You should therefore be able to read and write such programs. For the execution of these programs, we have the programmer's point of view which means that we assume that in each cycle, one instruction is executed. In reality, this is not the case, but that is the topic of RoSy.&lt;br /&gt;
&lt;br /&gt;
If such an exercise should be part of the exam, we will add a sheet of paper with all of the instructions. So, you don't have to remember them all, but it is recommended to have seen and understood them during the exam preparation. As said, the single-cycle execution of the instructions should then be sufficient.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1203/dira-last-chapters-processor-architecture-mips?show=1206#a1206</guid>
<pubDate>Fri, 17 Jul 2020 10:02:12 +0000</pubDate>
</item>
<item>
<title>Answered: DiRa-Hazard</title>
<link>https://q2a.cs.uni-kl.de/1150/dira-hazard?show=1151#a1151</link>
<description>That chapter is not so important. You should know what hazards are and why they could be there, &amp;nbsp;but last time the lecture was given, there wasn't enough time to go into the details. It would be now easy in the digital time to not count the time needed, but I would feel unfair to do this. Thus, let's decide to skip that chapter.</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/1150/dira-hazard?show=1151#a1151</guid>
<pubDate>Sat, 04 Jul 2020 08:49:36 +0000</pubDate>
</item>
<item>
<title>Answered: Exercise 4.1 Rounding Methods(1)</title>
<link>https://q2a.cs.uni-kl.de/848/exercise-4-1-rounding-methods-1?show=849#a849</link>
<description>&lt;p&gt;After scaling up by 2&lt;sup&gt;5&lt;/sup&gt; we are left with the remainder 0.4375. It is less than 0.5 so we round down. If it was more than 0.5 we would round up. &lt;em&gt;&quot;To nearest even&quot;&lt;/em&gt; only comes into play if we have exactly 0.5. This is why it's called a &lt;em&gt;tie-breaking&lt;/em&gt; rule (0.5 is a tie between up and down).&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/848/exercise-4-1-rounding-methods-1?show=849#a849</guid>
<pubDate>Tue, 26 May 2020 19:36:47 +0000</pubDate>
</item>
<item>
<title>Answered: Exercise 4.3 Rounding Methods(1)</title>
<link>https://q2a.cs.uni-kl.de/845/exercise-4-3-rounding-methods-1?show=847#a847</link>
<description>&lt;p&gt;The exercise says &lt;strong&gt;radix-2&lt;/strong&gt; number. Since it says &lt;em&gt;&quot;to 5 digits&quot;&lt;/em&gt; and not &lt;em&gt;&quot;to 5 digits after the point&quot;&lt;/em&gt; it does not matter whether or not it is a fixpoint number (note that radix numbers we used up until here are also just fixpoint numbers with their point right of the LSB).&lt;/p&gt;</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/845/exercise-4-3-rounding-methods-1?show=847#a847</guid>
<pubDate>Tue, 26 May 2020 16:36:16 +0000</pubDate>
</item>
<item>
<title>connection of entropy, minimum bits and coding length</title>
<link>https://q2a.cs.uni-kl.de/494/connection-of-entropy-minimum-bits-and-coding-length</link>
<description>Hello :)&lt;br /&gt;
&lt;br /&gt;
I have two questions concerning &amp;quot;Digitaltechnik &amp;amp; Rechnerarchitektur&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1. On Slide 36 we define the maximal entropy. Which information does it exactly give us? Is it always the entropy rounded up so that we get our minimal number of bits to encode the alphabet?&lt;br /&gt;
&lt;br /&gt;
2. Is there a conncection between the entropy and the average coding length of a letter in our alphabet? I understand that there is a conncetion to the weighted code size average but can we conclude something for our alphabet?&lt;br /&gt;
&lt;br /&gt;
I may have a problem understanding the difference between the number of bits and the coding length. I hope someone can help me :)&lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
&lt;br /&gt;
Paula</description>
<category># Mandatory Modules Bachelor</category>
<guid isPermaLink="true">https://q2a.cs.uni-kl.de/494/connection-of-entropy-minimum-bits-and-coding-length</guid>
<pubDate>Fri, 01 May 2020 06:25:25 +0000</pubDate>
</item>
</channel>
</rss>