<![CDATA[BitOperationen in GGB?]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb
Sun, 02 May 2021 14:50:21 +0000Thu, 15 Apr 2021 17:13:20 +0000Zend_Feed<![CDATA[I think you'll need a custom tool for that. First step convert 234 into binary like {1,1,1,0,1,0,1,0}]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303332
Thu, 15 Apr 2021 17:29:21 +0000<![CDATA[il y a 4 ans https://help.geogebra.org/t...]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303336
Thu, 15 Apr 2021 18:33:19 +0000<![CDATA[Für diese etwas veränderte Fragestellung würde ich es wie im Anhang lösen.]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303340
Thu, 15 Apr 2021 18:57:37 +0000<![CDATA[Ich hab mal versucht das als userfunction im CAS zu handeln.. aber Text und UniCode im CAS geht gar net.... z.B. führende Nullen verschwinden auch bei Text https://www.geogebra.org/m/anv8ymuc nicht dass Du da noch viel Zeit investierst?]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303344
Thu, 15 Apr 2021 19:06:48 +0000<![CDATA[Diese Variante kenne ich - siehe BitOperationen.ggb oder mit JS siehe BitOp-JS.ggb. Aber wenn ich folgendes Muster machen möchte wird dies zu einem untauglichen Aufwand: folge(folge(wenn(Mod(j xor k,m)==0,1,0),j,0,255),k,0,255) m..Modul Da hätte ich für xor gerne eine fertige Rechenoperation so wie +,-,*,/,^ . Es ist ja mehr gedacht als ein Wunsch bzw. eine Anregung für eine Erweiterung des Angebots an mathematischen Funktionen.]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303646
Wed, 21 Apr 2021 15:26:21 +0000<![CDATA[thanx, I know, but I need for double-loop and then this manipulation process is too complex. In mod-muster1.ggb there is Mod(x ²+y²,a) and I wish for example Mod(x xor y,a) or Mod( x and y,a) etc.]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303650
Wed, 21 Apr 2021 15:23:26 +0000<![CDATA[Attached are versions for AND and XOR that work reasonably well. I used the Iteration command to compute all the AND-values (or XOR-values) recursively. They are stored in a matrix, so they don't have to be re-computed whenever the value of a changes, instead they are just looked up to for the Mod operation. Computation might take a few seconds for a 201x201 matrix, and I advise to not let such a big matrix show in the Algebra window (my GeoGebra almost always crashed when I did that). There is a variable nmax which sets the size of the matrix, just set it lower if you need to show auxiliary variables. (In the attached files it is currently set to 50 just to be safe. Just set it higher again.)]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303662
Wed, 21 Apr 2021 20:12:45 +0000<![CDATA[thank you, very clever! I also have realized the bit-ops without string-transfer, but no idea to make an array of points withit.]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303784
Fri, 23 Apr 2021 12:09:27 +0000<![CDATA[Yes, that's the natural way to make a bit list, but it's rather slow due to the amount of operations involved. (That's why I used an iteration approach where you don't need the whole bit list.) Creating the point list via those bit lists isn't a problem either. Attached are 5 different AND-versions. All have nmax set to 20. Set it to 200 and see how long it takes to update. Mod-Muster-BitAND-Matrix-Sequence.ggb constructs a matrix of AND-values via bit lists, somewhat naively in a single command. It's rather slow.Mod-Muster-BitAND-Matrix-SequenceImproved.ggb also constructs a matrix of AND-values via bit lists, but avoids re-computing the two bitlists for each pair x,y. Instead the bitlist for each number up to nmax is computed beforehand, so they can be re-used in the matrix computation. It's only slightly faster though.Mod-Muster-BitAND-Matrix-Iteration.ggb constructs a matrix of AND-values via iteration. Each iteration doubles the size of the matrix. Avoids the need for complete bit representations. Instead numbers are split only in two parts: the lowest bit and the higher part. Bit operations for the higher parts don't have to be computed, they can simply be looked up in the last oteration of the matrix. About twice as fast as the bit list approach.Mod-Muster-BitAND-Matrix-JS.ggb constructs a matrix of AND-values via JavaScript. (OnUpdate script of nmax.) JavaScript comes with fast bitwise operators, so the values are computed ultra fast. The script actually produces an Execute-string for the matrix creation and executes it in GeoGebra (because modifying GeoGebra lists via JS is ultra slow). Maybe 50% faster than the iteration approach. (Main hang-up is probably that dealing with a 201x201-matrix is generally not fast in GeoGebra.)Mod-Muster-BitAND-direct-JS.ggb also uses JavaScript but skips the part of creating the AND-matrix and computes the point list directly. (OnUpdate script of nmax and also a.) About twice as fast as the JS version with the matrix. And fast enough that that the matrix isn't even needed, i.e., changing a doesn't produce a hang-up despite the complete re-computation. I also attempted to make a version using the spreadsheet, hoping that it might be faster than iteration over the big matrix, but the spreadsheet seems generally slow. Even building a 51x51-matrix took many times longer than 201x201 with a bit list. So I scrapped this approach.]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-303798
Fri, 23 Apr 2021 18:50:26 +0000<![CDATA[thank you very much!]]>
https://help.geogebra.org/topic/bitoperationen-in-ggb#comment-304204
Sun, 02 May 2021 14:50:21 +0000