<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Week #08 - Decimal to Binary Algorithm Implementation by </title>
      <link>https://padlet.com/mpaulding1/jl3g0uewk7auoiks</link>
      <description>In groups of 2-3, propose a method that will take an integer (address) and output a String of length 16 (since our computer is 16-bits) representing the address&#39; binary value. For example, the address of 20 should be transformed into the String &quot;0000000000010100&quot;</description>
      <language>en-us</language>
      <pubDate>2025-10-07 18:39:21 UTC</pubDate>
      <lastBuildDate>2025-10-08 00:56:47 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>The Goal!</title>
         <author>mpaulding1</author>
         <link>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622405313</link>
         <description><![CDATA[<p><strong>Instructions</strong></p><ol><li><p>In groups of 2-3, using either pseudocode, Java code, or written instructions, describe how you would implement the method:</p><p><br/></p><p><strong>public String decimalToBinary(int address)</strong></p><p><br/></p><p>Precondition: address is a non-negative integer &lt; 32768</p><p><br/></p><p>Postcondition: return value must be a String of length 16</p><p><br/></p></li><li><p>Please post your ideas (or solution) to this Padlet.</p></li><li><p>Optionally, attach an image or diagram if it helps illustrate your work</p></li></ol>]]></description>
         <pubDate>2025-10-07 18:39:30 UTC</pubDate>
         <guid>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622405313</guid>
      </item>
      <item>
         <title>The solution: by Sidney</title>
         <author></author>
         <link>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622718785</link>
         <description><![CDATA[<p>int result = address;</p><p>int remainder;</p><p>String binary = "";</p><p>while(result!=0) {</p><p>	remainder = result % 2;</p><p>	result = result / 2;</p><p>	binary = remainder + binary;</p><p>}</p><p>while(binary.length &lt; 16) binary = '0' + binary;</p><p>return binary;</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-10-08 00:38:00 UTC</pubDate>
         <guid>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622718785</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622721337</link>
         <description><![CDATA[<pre><code>StringBuilder res = new StringBuilder();

int div = address;
int rem;

while (div != 0) {
    rem = div % 2;
    div /= 2;

    res.append(rem);
}

while(res.length() != 16) {
    res.append('0');
}

return "0b"+ res.reverse();</code></pre>]]></description>
         <enclosure url="" />
         <pubDate>2025-10-08 00:39:49 UTC</pubDate>
         <guid>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622721337</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622721543</link>
         <description><![CDATA[<p>By Caiden and Alex</p>]]></description>
         <enclosure url="https://padlet-uploads-usc1.storage.googleapis.com/4519370274/d57d5e10acefab016f35c18cdbbc307d/image.png" />
         <pubDate>2025-10-08 00:40:01 UTC</pubDate>
         <guid>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622721543</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622727426</link>
         <description><![CDATA[<p>int dividend = 20;</p><p>int bit = 0;</p><p>int bitmask = 1;</p><p>int i = 0;</p><p>bits = "";</p><p>while (bitmask &lt; 65536)</p><p>{</p><p>	bit = (dividend &amp; bitmask) &gt;&gt; i;</p><p>	bitmask = bitmask &lt;&lt; 1;</p><p>	i++;</p><p>        bits = Integer.toString(bit) + bits;</p><p>}</p><p>System.out.println(bits);</p>]]></description>
         <enclosure url="" />
         <pubDate>2025-10-08 00:45:41 UTC</pubDate>
         <guid>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622727426</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622729111</link>
         <description><![CDATA[<pre><code>final int MAX = 32768;
int remainder [] = new int [16] ;
String result = "";
int count = 0;
if(address &lt; 32768 &amp;&amp; address &gt;= 0){
    while(address &gt; 0){
        remainder[count++] = address % 2;
        address = address / 2 ;
    }
    for (int i = 15; i&gt;=0; i--){
        result = result +  remainder[i];
    }
}</code></pre>]]></description>
         <enclosure url="" />
         <pubDate>2025-10-08 00:47:13 UTC</pubDate>
         <guid>https://padlet.com/mpaulding1/jl3g0uewk7auoiks/wish/3622729111</guid>
      </item>
   </channel>
</rss>
