<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Shriharsh Acharya</title>
    <link>https://shriharsh.com.np/</link>
    <description>Recent content on Shriharsh Acharya</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sun, 01 Feb 2026 22:16:30 +0545</lastBuildDate><atom:link href="https://shriharsh.com.np/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Nix Mystery</title>
      <link>https://shriharsh.com.np/posts/2026-02-01-nix-mystery/</link>
      <pubDate>Sun, 01 Feb 2026 22:16:30 +0545</pubDate>
      
      <guid>https://shriharsh.com.np/posts/2026-02-01-nix-mystery/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been wanting to use nix for a long time, and it seems that the time has finally come.&lt;/p&gt;
&lt;p&gt;Nix always has been something familiar but unknown to me for a while.
I know Nix lets you manage packages in a declarative fashion and it is reproducible.&lt;/p&gt;
&lt;p&gt;But in all honesty, these are just buzz words which I really don&amp;rsquo;t understand just yet.
So, I&amp;rsquo;ll just look into what actually Nix is.&lt;/p&gt;
&lt;h2 id=&#34;setup&#34;&gt;Setup&lt;/h2&gt;
&lt;h3 id=&#34;searchqnix&#34;&gt;&lt;em&gt;search?q=nix&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;Aparently, Nix is a package manager that works on a functional programming language,
called &lt;em&gt;Nix&lt;/em&gt;, which is interesting as I&amp;rsquo;m interested in functional programming.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m obviously not going to opt into using nixOS or nix for my host system just right now.
For now, the middleground for me seems to just use nix in my host system to build a nixOS system and run it on &lt;strong&gt;QEMU&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PS: QEMU is a great tool to emulate a PC environment.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&#34;pacman--q-nix&#34;&gt;&lt;em&gt;pacman -Q nix&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;Something I realized off the boat was that for some reason, nix has majority of their &amp;ldquo;useful&amp;rdquo;
utilities and tool under an experimental feature, which seems quite odd.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo pacman -S nix&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll have to make sure that locked features like nix-shell and flake, I&amp;rsquo;ll have to add to:
&lt;code&gt;/etc/nix/nix.conf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;experimental-features = nix-command flakes&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;nix---help&#34;&gt;&lt;em&gt;nix &amp;ndash;help&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;So aparently, nix uses flakes for packaging and reproducing builds, which seems
analogous to cargo for rust.
As, the nix package repository stores all the nix packages in form
of nix expressions of sometimes a flake itself.&lt;/p&gt;
&lt;h3 id=&#34;nix-flake-init&#34;&gt;&lt;em&gt;nix flake init&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;So, looking into how nix works, it seems to me that I&amp;rsquo;ve gone ahead and built a simple
hierarchy of how my files are structured and how the flake is going to look, and named the
configuration kanto.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nix flake init&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;├── flake.lock
├── flake.nix
├── hosts
│   └── kanto
│       ├── default.nix
│       ├── hardware.nix
│       ├── services.nix
│       └──users.nix
├── justfile
├── README.md
└── result -&amp;gt; /nix/store/jibberish-hash
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Directories:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hosts/ - Holds configuration for multiple hosts
kanto/ - Holds configuration for kanto
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Files:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;default.nix  - entrypoint
hardware.nix  - fs and bootloader
users.nix  - user config 
services.nix  - daemons
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;configuration&#34;&gt;Configuration&lt;/h2&gt;
&lt;h3 id=&#34;--&#34;&gt;&lt;em&gt;{&amp;hellip;} : {}&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;Since, the most interesting part of nix is about, how I can &amp;ldquo;declare&amp;rdquo; my OS.
So, I ended up writing:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;default.nix

{ config, pkgs, ... }:

{
  imports = [ ./hardware.nix ./users.nix ./services.nix ];
  networking.hostName = &amp;#34;kanto&amp;#34;;
  time.timeZone = &amp;#34;Asia/Kathmandu&amp;#34;;
  system.stateVersion = &amp;#34;24.11&amp;#34;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;{config,pkgs, ...}:&lt;/code&gt;   :
This essentially introduces my flake&amp;rsquo;s function which takes in a config, pkgs, and a variadic.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{ bunch of declarations }&lt;/code&gt;   :   This is the block, this returns an object with import, networking, time and system fields, which define our system.&lt;/p&gt;
&lt;h3 id=&#34;nix-build&#34;&gt;nix build&lt;/h3&gt;
&lt;p&gt;This makes our configuration able to run on QEMU. Let&amp;rsquo;s try to build it:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nix run nixpkgs#nixos-rebuild -- build-vm --flake .#kanto&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lsquo;#&amp;rsquo; here is the fragment specifier.
But I liked to think of it as a package access specfier, like accessing the package from a flake.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It works, but I might&amp;rsquo;ve cheated, as I&amp;rsquo;ve already written some declarations in some of the files.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hardware.nix

{ config, ... }:

{

  boot.loader = {
    grub = {
      enable = true;
      efiSupport = true;
      device = &amp;#34;nodev&amp;#34;;
    };
    efi.canTouchEfiVariables = true;
  };

  fileSystems.&amp;#34;/&amp;#34; = {
    device = &amp;#34;/dev/disk/by-label/nixos&amp;#34;;
    fsType = &amp;#34;ext4&amp;#34;;
    options = [ &amp;#34;noatime&amp;#34; ];
  };

  fileSystems.&amp;#34;/boot&amp;#34; = {
    device = &amp;#34;/dev/disk/by-label/BOOT&amp;#34;;
    fsType = &amp;#34;vfat&amp;#34;;
  };
  swapDevices = [
  { device = &amp;#34;/dev/disk/by-label/swap&amp;#34;; }
  ];
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This defines my hardware, currently assumed that my system has simple dual partitions:
and also have assumed a swap.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;#34;/&amp;#34; - primary partition
&amp;#34;/boot&amp;#34; - boot partition
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The fact that if you&amp;rsquo;ve understood the syntax of nix, this is very much readable.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Nix&lt;/strong&gt; actually stores each of its rebuilds as &lt;strong&gt;generations&lt;/strong&gt; and allows
the user to boot into any of its builds, hence making it extremely &lt;strong&gt;tolerant&lt;/strong&gt; to any
faulty builds.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;users.nix

{config,pkgs,...}:

{
  users.users.irhs = {
    isNormalUser = true;
    description = &amp;#34;Admin&amp;#34;;
    extraGroups = [ &amp;#34;networkmanager&amp;#34; &amp;#34;wheel&amp;#34; ];
    openssh.authorizedKeys.keys= [
        &amp;#34;your-ssh-pub-key&amp;#34;
    ];
  };
  programs.zsh.enable = true;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here, we&amp;rsquo;re just declaraing a simple user called &amp;ldquo;irhs&amp;rdquo; with hierarchy as:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;users = {
    users = {
        irhs = {
            # above configurations 
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;
&lt;p&gt;This structure has a high resemblance to recursive structures defined
in LISP.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;#39;((
users . ((
 users . ((
     shri . ((
        ; above configuration
            ))
        ))
    ))
))
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;This essentially shows how the origin of nix was highly inspired from LISP and how it has vastly simplified it.
In my mind, I&amp;rsquo;ve mostly been reiterating how nix seemed really familiar with my time configuring emacs.&lt;/p&gt;
&lt;p&gt;Now for the final part, I have to ensure that I am able to remotely access the machine, so I have to setup a sshd,
for which I&amp;rsquo;ll have to populate &lt;code&gt;services.nix&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;services.nix 

{ config, pkgs, ... }:
{
    services = {
      openssh = {
          enable = true;
          settings.PermitRootLogin = &amp;#34;no&amp;#34;; 
          settings.PasswordAuthentication = true;
        };
    };
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is relatively straight forward, and now if I build the OS.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;building the system configuration...
Done. The virtual machine can be started by running /nix/store/2b59ryh0v0fan4wr8q0b04b2zniz4srp-nixos-vm/bin/run-kanto-vm
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;run-kanto-vm&#34;&gt;&lt;code&gt;run-kanto-vm&lt;/code&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;Actually, all the packages that I intend on adding to my system in the future,
are actually stored in a central repository &lt;code&gt;/nix/store&lt;/code&gt; in my system.
And it successfully boots into NixOS, but that is not our goal. We&amp;rsquo;ll have to try to ssh into it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/CGYmuBT.png&#34; alt=&#34;Login Menu&#34;&gt;&lt;/p&gt;
&lt;p&gt;And well it works as well.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/hT4lEHh.png&#34; alt=&#34;SSH Prompt&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;finishing-up&#34;&gt;Finishing up&lt;/h2&gt;
&lt;p&gt;Nix isn&amp;rsquo;t just a package manager; it’s an abstraction layer over the messiness of Linux.&lt;/p&gt;
&lt;p&gt;By treating my OS like my emacs configuration, with simpler syntax and large amount of
packages. I can avoid imperative deficiencies like failing commands and expecting functional
reliability of declaraing my operating system.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For anybody looking into this article, this is not something you should follow,
I&amp;rsquo;ve only written this as a note to myself
and to understand about Nix a little bit more.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
    </item>
    
    <item>
      <title>Is it me or is it we?</title>
      <link>https://shriharsh.com.np/posts/2026-01-16-is-it-me-or-is-it-we/</link>
      <pubDate>Fri, 16 Jan 2026 22:16:30 +0545</pubDate>
      
      <guid>https://shriharsh.com.np/posts/2026-01-16-is-it-me-or-is-it-we/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m always amazed by how our society has developed and how we see value.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve always seen value as something that benefits me.&lt;/p&gt;
&lt;p&gt;But if one thinks about it, it is never about me,
rather it is about &lt;strong&gt;us&lt;/strong&gt; and how we as a society have developed over the years.&lt;/p&gt;
&lt;p&gt;Only now that I have come to realize that I&amp;rsquo;m not being valued for what I do for myself
rather what I have done for the society or for the species.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not being valued in a group for the work I have done for myself, but for what change I contributed to.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;Love as a principle, order as a foundation, progress as a goal&amp;rdquo;&lt;/em&gt; ~Augste Comte&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Ideals</title>
      <link>https://shriharsh.com.np/posts/2026-01-06-ideals/</link>
      <pubDate>Tue, 06 Jan 2026 22:16:30 +0545</pubDate>
      
      <guid>https://shriharsh.com.np/posts/2026-01-06-ideals/</guid>
      <description>&lt;div style=&#34;text-align: center;&#34;&gt;
  &lt;div style=&#34;display: inline-block; text-align: center;&#34;&gt;
    &lt;style&gt;
       
      .centered-content ul {
        list-style-position: inside;
        padding: 0;
        margin: 0;
      }
       
       
    &lt;/style&gt;
    &lt;div class=&#34;centered-content&#34;&gt;
      &lt;blockquote&gt;
&lt;h1 id=&#34;are-you-truly-free&#34;&gt;Are you truly free?&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Will you stay with nothing but your ideals?&lt;/li&gt;
&lt;li&gt;Will you bring any value, or only your ideals?&lt;/li&gt;
&lt;li&gt;Will your ideals struggle with you?&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;are-you-truly-able&#34;&gt;Are you truly able?&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Will you follow your ideals even with the person you love?&lt;/li&gt;
&lt;li&gt;Will you sell your dusty old laptop?&lt;/li&gt;
&lt;li&gt;Will you leave that job—the one that gives you your &amp;ldquo;freedom&amp;rdquo;—to go live by yourself with nothing but the value you accumulated to make you &amp;ldquo;free&amp;rdquo;?&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;are-you-truly-strong&#34;&gt;Are you truly strong?&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Will your ideals change if they are proven at fault?&lt;/li&gt;
&lt;li&gt;Will you have the courage to disagree?&lt;/li&gt;
&lt;li&gt;Will you stick to your ideals when it matters most?&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

</description>
    </item>
    
    <item>
      <title>Designing an 8-bit ALU</title>
      <link>https://shriharsh.com.np/posts/2025-02-04-designing-an-alu/</link>
      <pubDate>Tue, 04 Feb 2025 09:49:24 +0545</pubDate>
      
      <guid>https://shriharsh.com.np/posts/2025-02-04-designing-an-alu/</guid>
      <description>&lt;p&gt;Rather than overcomplicating things,lets start off with the design:&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;design-decisions&#34;&gt;Design Decisions&lt;/h2&gt;
&lt;p&gt;To get a grip on the basics and to build a strong foundation, I decided to research prior ALU designs and go through articles and datasheets with solid community backing.&lt;/p&gt;
&lt;p&gt;Lucky for me, I stumbled upon a goldmine—a detailed breakdown of the classic &lt;strong&gt;74181 IC&lt;/strong&gt;, a 4-bit ALU chip that became a standard reference for simple ALU design.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://upload.wikimedia.org/wikipedia/commons/d/d7/SN74S181N.JPG&#34; alt=&#34;74181 IC&#34;&gt;&lt;/p&gt;
&lt;p&gt;From its function table, I understood how the chip operates, including the variety of logic and arithmetic operations it supports.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKiFhIQ22nNmEZygmBd79R414J7YkcmE8dkyUenn1yMSiECKV8l5g_xChCnP9aJf5hL-8TKHt_YOVmjeLJZLQLM3zptUBEhnCznXDlzE4eV_VDB-wjruh2yXIc8iFQXJZT3XS82DXacuaj/w9999/datasheet-74181-operations.png&#34; alt=&#34;74181 Operations Table&#34;&gt;&lt;/p&gt;
&lt;p&gt;However, after reading discussions about the 74181’s internal design, I noticed a bit of division in the community. Some love it for its elegance; others think it’s unnecessarily complex.&lt;/p&gt;
&lt;p&gt;So, I decided to go with a more minimal and modular approach tailored to my own understanding.&lt;/p&gt;
&lt;p&gt;And instead of sticking with a 4-bit design like the original 74181, I &lt;strong&gt;upgraded to an 8-bit ALU&lt;/strong&gt;. This gave me more headroom for meaningful operations while still keeping the design manageable.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&#34;opcode-mapping-8-bit-alu&#34;&gt;OPCODE Mapping (8-bit ALU)&lt;/h3&gt;
&lt;p&gt;To control the operations, I created a simple &lt;code&gt;4-bit OPCODE&lt;/code&gt; system, allowing for &lt;strong&gt;16 unique instructions&lt;/strong&gt;. Here&amp;rsquo;s a look at the operation mapping:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;strong&gt;OPCODE&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;UNIT&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;OPERATION&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;DESCRIPTION&lt;/strong&gt;&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;0000&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;AU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;ADDC&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Add with Carry&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;0001&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;AU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SUBC&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Subtract with Carry&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;0010&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;AU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;ADDO&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Add with Overflow&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;0011&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;AU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SUBO&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Subtract with Overflow&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;LU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;XOR&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Bitwise XOR&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;1001&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;LU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;NOT&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Bitwise NOT&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;1010&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;LU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;AND&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Bitwise AND&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;1011&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;LU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;OR&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Bitwise OR&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;1100&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;LU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;NAND&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Bitwise NAND&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;1101&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;LU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;NOP&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;No Operation&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;1110&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;LU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;XNOR&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Bitwise XNOR&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;1111&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;LU&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;NOR&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Bitwise NOR&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id=&#34;final-design-specs&#34;&gt;Final Design Specs&lt;/h2&gt;
&lt;h3 id=&#34;flags&#34;&gt;FLAGS&lt;/h3&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;strong&gt;FLAG&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;OVERFLOW&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;em&gt;Only for signed addition operations&lt;/em&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;ZERO&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;em&gt;Set if result is zero&lt;/em&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;NEGATIVE&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;em&gt;Only for subtraction operations&lt;/em&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;CARRY&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;em&gt;For additions exceeding 8-bit limits&lt;/em&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&#34;bus-layout&#34;&gt;BUS Layout&lt;/h3&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;strong&gt;BUS&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;WIDTH&lt;/strong&gt;&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;INPUT_BUS&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;8&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;OP_CODE&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;4&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;OUTPUT_BUS&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;8&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;STATUS_IN&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;STATUS_OUT&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;4&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id=&#34;workflow&#34;&gt;Workflow&lt;/h2&gt;
&lt;p&gt;My approach wasn’t exactly linear—I leaned into an &lt;strong&gt;iterative workflow&lt;/strong&gt;, learning from each version of the build. Each iteration gave me new insights and helped polish the final design step by step.&lt;/p&gt;
&lt;h2 id=&#34;iterative-design-process-diagramhttpsiimgurcomwqfjq7lpng&#34;&gt;&lt;img src=&#34;https://i.imgur.com/wqfJQ7L.png&#34; alt=&#34;Iterative Design Process Diagram&#34;&gt;&lt;/h2&gt;
&lt;h2 id=&#34;design-implementation--selection&#34;&gt;Design Implementation &amp;amp; Selection&lt;/h2&gt;
&lt;p&gt;I experimented with multiple logic gates and missed a few things here and there.&lt;br&gt;
Here&amp;rsquo;s my implementation for the AU, which is quite conventional.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/LjeHghY.png&#34; alt=&#34;1 BIT AU&#34;&gt;&lt;/p&gt;
&lt;p&gt;Here, the AU performs the selection of operations specified in the table below.&lt;br&gt;
Also, worth mentioning is the fact that the ALU only has 4 operations as opposed to the LU, so the LSB for this is just neglected.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;strong&gt;OP_CODE&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;OPERATION&lt;/strong&gt;&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;x00&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;ADDC&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;x01&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SUBC&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;x10&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;ADDO&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;x11&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SUBO&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/ttLyGsv.png&#34; alt=&#34;1 BIT LU&#34;&gt;&lt;/p&gt;
&lt;p&gt;Similarly, the LU performs the Logical Operations, and since they&amp;rsquo;re a bit less tedious to implement, I just implemented all the 8 possible operations.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;strong&gt;OP_CODE&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;OPERATION&lt;/strong&gt;&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;000&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;XOR&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;001&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;NOT&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;010&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;AND&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;011&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;OR&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;100&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;NAND&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;101&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;NOP&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;110&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;XNOR&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;111&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;NOR&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: The lack of the last bit of the input OPCODE is because it will be used to choose between the AU and the LU.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/aJvg3fe.png&#34; alt=&#34;1 BIT ALU&#34;&gt;&lt;/p&gt;
&lt;p&gt;Finally, this is the fundamental block for the operation of the ALU — the mighty &lt;strong&gt;1-bit ALU&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Now that the hard part of designing the fundamentals is done, the more &lt;em&gt;complex-looking&lt;/em&gt; block comes into play, where all of the smaller blocks are copied and pasted to get a final design like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/MQs2aKr.png&#34; alt=&#34;8 BIT ALU&#34;&gt;&lt;/p&gt;
&lt;p&gt;This implementation of the &lt;strong&gt;8-bit ALU&lt;/strong&gt; is very basic and might contain unnecessary operations.&lt;br&gt;
Yet, I call it &lt;em&gt;not unnecessary&lt;/em&gt;, as more or less all the required operations have to be implemented — and the added operations that are implemented within it are always dependent on the task to be accomplished.&lt;/p&gt;
&lt;p&gt;Playing around with the final block, I implemented the input as &lt;code&gt;8-bit&lt;/code&gt; registers which can be manipulated by the user, and the output from the previous carry is fed back into the register as a part of operation in the ALU.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/48cMpcM.png&#34; alt=&#34;Playing Around&#34;&gt;&lt;/p&gt;
&lt;p&gt;I personally didn’t get into the HDL or VHDL implementation of these circuits, as they were quite irrelevant and out of my expertise at the time.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://teaching.idallen.com/dat2343/10f/notes/040_overflow.txt&#34;&gt;Overflow vs Carry Flag – Explanation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Arithmetic_logic_unit&#34;&gt;Arithmetic Logic Unit - Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>About Digital Literacy</title>
      <link>https://shriharsh.com.np/posts/2024-06-11-digital-literacy/</link>
      <pubDate>Tue, 11 Jun 2024 00:00:00 +0000</pubDate>
      
      <guid>https://shriharsh.com.np/posts/2024-06-11-digital-literacy/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Introduction
&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;blockquote&gt;
&lt;p&gt;Why is digital literacy important?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since,the world isn&amp;rsquo;t all as developed uniformly as it has to,it is for sure that digital literacy is a term,only focusing on the developed/developing countries as the jargon we&amp;rsquo;re using doesn&amp;rsquo;t make sense for the people of ethiopia. So, the digital literacy is severely important, as most of the countries have been polluted with gadgets but haven&amp;rsquo;t have the the people without digital knowledge been given the proper exposure to learn about the technology. But at the same time technologies are being emphasized and embedded in daily acitivities.
This what makes the people of lack of knowledge fall into the gap, a void.
So,it is important to fill up this void, this gap in knowledge to make the everyday living of the people too in the same page as us.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How to be digitally literate:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In today&amp;rsquo;s world,digital literacy has only associated itself with the literacy of digital gadgets and mobile phones.But in nature,it is actually not just related to information literacy but also with curiosity.
It is not about how much one is literate about a subject of digital gadgets, but what he does with the information he has.
As a person born as a Gen-Z, I can&amp;rsquo;t call myself digitally illiterate at any point of my life.
But for my parents who have lived to see the transition of the world from no digital devices to being full of them, are expected to be digitally illiterate.&lt;/p&gt;
&lt;p&gt;But their age doesn&amp;rsquo;t hold their curiosity, my father calls himself a digitally illiterate but tries to use his phone to everybit, doesn&amp;rsquo;t know about it, but tries to rummage over everything configuration he is allowed.&lt;/p&gt;
&lt;p&gt;This is what being digitally literate is,not about being able to only tap buttons to make something magically happen,but use digital things to your liking and your advantage as you like.&lt;/p&gt;
&lt;blockquote&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;/blockquote&gt;
</description>
    </item>
    
    <item>
      <title>Build me a packet please!</title>
      <link>https://shriharsh.com.np/external/</link>
      <pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
      
      <guid>https://shriharsh.com.np/external/</guid>
      <description>&lt;h2 id=&#34;packets&#34;&gt;Packets&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;tl;dr: Packet is built upon the protocol it is travelling in.It goes woosh woosh with essential data and also contains its size along with its type of data.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&#34;https://i.redd.it/9qapun2q95o31.jpg&#34; alt=&#34;Packet Image&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;This is a physical packet&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;hr&gt;
&lt;h3 id=&#34;trying-to-build-a-simple-packet&#34;&gt;Trying to build a simple packet&lt;/h3&gt;
&lt;p&gt;➡️ &lt;code&gt;Protocol&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;A protocol a set of rules that a network connect should/could follow for uniformity of exchange.
So,its not necessary but is.&lt;!-- raw HTML omitted --&gt;So,for now,lets us just assume a simple protocol of an arbitrary name of saltim.It&amp;rsquo;s just that easy,now as we&amp;rsquo;re done with the hard part.Now for the easy bit.&lt;/p&gt;
&lt;p&gt;Some of the more commonly used protocols are:&lt;/p&gt;
&lt;p&gt;1.&lt;code&gt;TCP(Trasmission Control Protocol)↔️&lt;/code&gt;
2.&lt;code&gt;UDP(User Datagram Protocol)➡️&lt;/code&gt;
3.&lt;code&gt;FTP(File Transfer Protocol)🗃️&lt;/code&gt;
4.&lt;code&gt;IP(Internet Protocol)🌐&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;➡️ &lt;code&gt;Designing a packet&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;So,A packet in the most fundamental state is just pure data.Anything could be a packet.It could be you throwing a ball of binary &lt;code&gt;101010100110000001001&lt;/code&gt; to your friend during the class or a president hitting the button for the nuclear missile to set its way with complex set of instructions within the packet to make sure of its authenticity.&lt;/p&gt;
&lt;p&gt;So our packet in &lt;code&gt;saltim&lt;/code&gt; which is a very basic packet would kind of look like this in high-level with the payload and all the attached info along with it.The data along with will be explained in.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://shriharsh.com.np/images/packet_filled_of.png&#34; alt=&#34;Packet Filled Of&#34;&gt;&lt;/p&gt;
&lt;p&gt;➡️ &lt;code&gt;The packet&#39;s data architecture.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So,from the above assumption of the saltim packet that we use.The saltim packet has the different parts to a structure in the packet:&lt;/p&gt;
&lt;p&gt;1.&lt;code&gt;The Payload&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The payload to a data contains the important data to a packet, &lt;strong&gt;essentially&lt;/strong&gt;,the data that is sent by the by any of the parties that are involved in the connection.&lt;/p&gt;
&lt;p&gt;It could be anything of the sort of saying hello,to being a bash command being sent.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is kind of impossible for one to decrypt what is said in the modern day encryption that is used for the packets that travel via selected protocols.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;2.&lt;code&gt;Size info&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Yes,sorry guys,but &lt;em&gt;size does matter&lt;/em&gt;.In case of packets,it is quite necessary for the packets to contain their size info to be attached else it is not possible to locate the end of the packet and the start of another packet as a connection has a flow of packets.A end info the packet end could be helpful to locate the end of the packet and make it easier for the location of the then packet.&lt;/p&gt;
&lt;p&gt;3.&lt;code&gt;Info data&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;A data in the payload can be a various types:&lt;code&gt;xml&lt;/code&gt;,&lt;code&gt;json&lt;/code&gt;,etc.
&lt;!-- raw HTML omitted --&gt;
So,for the data type to be known it could be helpful for the receiver to parse the data as the data received has a known structure.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
    size-info:10,//assumed
    payload:&amp;quot;Turn On&amp;quot;,
    end-info:0x1B39, 
    data-info:&amp;quot;json&amp;quot;    
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;4.&lt;code&gt;End info&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The endinfo contains an end pattern that the receiver is able to identify as a pattern of ending byte.It could be anything but it must be something that isn&amp;rsquo;t included in the payload data.ie.If the payload data is an ascii string anything out of the ascii range,ie,8 bit data we could make an ascii string.So,we could assume&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;0x1B39
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;a data passed as ending sequence as it is not included in the ascii range.Since the data isn&amp;rsquo;t passed in the ascii range,it packet would be considered ended and the packet read would be completely received.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;WOOOOOOOOOOOO!! The packet is ready to be sent.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;ending-note&#34;&gt;Ending note:&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;It could be said that this model of implementation of packet sending and networking is only a theoritical model&lt;/strong&gt;
&lt;strong&gt;that could be used for small implementation that are easily compromisable with various flaws and disadvantages,&lt;/strong&gt;
&lt;strong&gt;but yet,these were the only protocols that were able to build other more complex protocols,as they&amp;rsquo;re just a&lt;/strong&gt;
&lt;strong&gt;manifestation of smaller protocols.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=kH7P7ZX44DQ&#34;&gt;Took an understanding of this video&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>My First Hackathon</title>
      <link>https://shriharsh.com.np/posts/2024-03-10-my-first-hackathon/</link>
      <pubDate>Sun, 10 Mar 2024 00:00:00 +0000</pubDate>
      
      <guid>https://shriharsh.com.np/posts/2024-03-10-my-first-hackathon/</guid>
      <description>&lt;h1 id=&#34;my-first-hackathon&#34;&gt;My First Hackathon&lt;/h1&gt;
&lt;p&gt;It was a random call by my friend which led me into trying the hardware hackathon.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Spoiler&lt;/strong&gt;: We built a bionic arm.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://shriharsh.com.np/images/bionic_arm.jpg&#34; alt=&#34;Bionic Arm&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;pre-story&#34;&gt;Pre-Story&lt;/h2&gt;
&lt;p&gt;Not the hardware part but as a whole, hardware hackathon to me, was really the first one I had attended. It was on a tight schedule because it was really in the midst of my internals but that&amp;rsquo;s out of topic. So, let us let it be.&lt;/p&gt;
&lt;p&gt;I rushed to the hall where it were to be started. When I came, the time already had started and we were revealed the theme.&lt;/p&gt;
&lt;h2 id=&#34;first-5-hours&#34;&gt;First 5 Hours&lt;/h2&gt;
&lt;p&gt;The theme was to create something that was sellable.&lt;/p&gt;
&lt;p&gt;The first 5 hours were quite normal, we brainstormed, as all of us were quite new to it, we were very unsure of what to build and how to go about it. We took ideas from everyone and we stumbled on the idea of building a &lt;em&gt;Smart Vacuum Cleaner&lt;/em&gt;. Not the most original but we were thinking of implementing a local positioning system.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;It was given a thumbs up by the team members.&lt;/p&gt;
&lt;h2 id=&#34;5-10-hours&#34;&gt;5-10 Hours&lt;/h2&gt;
&lt;p&gt;We on the first thought, of it to be easy and tried also of building a sort of heatmap of where the vacuum cleaner would suck the most dust and from that data we would provide it to the user and make them know about the specific spots of dust collection in the space.&lt;/p&gt;
&lt;p&gt;For the designing part me and my other friend were assigned to it and built a diagram on the paper which kind of looked like this.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://shriharsh.com.np/images/design.jpg&#34; alt=&#34;Design&#34;&gt;&lt;/p&gt;
&lt;p&gt;Pretty cute, isn&amp;rsquo;t it.&lt;/p&gt;
&lt;p&gt;For the hardware implementation, we were allowed to use just the arduino nano along with the necessary components. I then shifted towards the software yet, it was about time I got really tired. I had spent most of my time trying to learn how to code the DAMN arduino. So, I also had gotten frustrated. So, I slept.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;ZZzZZZZzzZZZzzZZZ&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Right after I woke up. The guys had just made the thing move. YES IT ACTUALLY MOVED. They ended up re-wiring the whole thing and made the right adjustments for the robot by the help of Nirjal Da. But the revelation only lasted so long, they were tired so, I had to boot myself up and work on the software for the turning and rotation mechanisms.&lt;/p&gt;
&lt;h2 id=&#34;10-15-hours&#34;&gt;10-15 Hours&lt;/h2&gt;
&lt;p&gt;I ended up implementing the rotation and learning about the pins and the motor driver that way. It was the time where I had learnt most during the hackathon. (Majority other was fucking around and playing around.)&lt;/p&gt;
&lt;h2 id=&#34;technical-part&#34;&gt;Technical Part&lt;/h2&gt;
&lt;p&gt;So, for the motor drivers and the arduino part. This is what I understood that I could explain.&lt;/p&gt;
&lt;p&gt;Arduinos are a variety of MCU. While the one provided to us nano is one which works in 5V as its supply. It usually can work with power supplied to it by the usb connected to the external device while flashing it.&lt;/p&gt;
&lt;p&gt;For our circuitry, it works in the following way if it were to be simplified while sending the signals from the arduino to the motors.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://shriharsh.com.np/images/unga_bunga_circuit.jpg&#34; alt=&#34;Unga Bunga Circuit&#34;&gt;&lt;/p&gt;
&lt;p&gt;(nano-&amp;gt;m-driver-&amp;gt;voltage-pins-&amp;gt;motors).&lt;/p&gt;
&lt;h3 id=&#34;signal-types&#34;&gt;Signal Types&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Analog Signals&lt;/strong&gt;: Analog Signals are the continuous signals.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Digital Signals&lt;/strong&gt;: Digital Signals are discrete value containing signals.
&lt;img src=&#34;https://shriharsh.com.np/images/digital_analog.png&#34; alt=&#34;Digital Analog&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;PWM (Pulse Width Modulation)&lt;/strong&gt;: Is the process of modulation of a wave such that the wave is made a single way, by the use of digital signals.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, we used the PWM supporting pins in the arduino nano to control the speed of the motor in using the enable a and enable b pins in the motor driver and the remaining 4 pins were utilized in supplying digital signal without PWM. Which solely sent data to either rotate or not to rotate the motor.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://shriharsh.com.np/images/unga_bunga_circuit_zoomed.jpg&#34; alt=&#34;Unga Bunga Circuit Zoomed&#34;&gt;&lt;/p&gt;
&lt;p&gt;The code was pretty easy as it was a black box and we only had to use the arduino&amp;rsquo;s ide to flash and compile. It just required, setting up all the required data in the setup() function and have all the necessary data in the loop() function. The most important part about programming arduino I learnt was that. There shouldn&amp;rsquo;t be much or no use of loops because they interfere with the workings of the hardware and make it such that not enough supply is supplied to the components. So, always use an if statement.&lt;/p&gt;
&lt;h2 id=&#34;15-24-hours-the-curveball&#34;&gt;15-24 Hours: The Curveball&lt;/h2&gt;
&lt;p&gt;Now, this is when we realized that life hit us with a curveball. Although we had ambitious plans of creating this/that but we weren&amp;rsquo;t the most prepared for it since we were new. We were naive, but &lt;strong&gt;curious&lt;/strong&gt;. I tried my best to think of something that could bring a better implementation to our project. Nothing could. We weren&amp;rsquo;t able to implement the required algorithms and also we weren&amp;rsquo;t able to setup what we wanted. So, we had to scrap it.&lt;/p&gt;
&lt;p&gt;So, in the time pressure, we built what we had in the pocket. All we had to do was to create a working hand and for the software, it was ready. (From the existent project, one of us had done.)&lt;/p&gt;
&lt;p&gt;So, we did. I&amp;rsquo;m kinda tired cause its almost 1:00 am and I&amp;rsquo;m kinda of bored writing this soooooooo&amp;hellip;&amp;hellip;&lt;/p&gt;
&lt;h5 id=&#34;01001110011001010111001001100100&#34;&gt;01001110011001010111001001100100&lt;/h5&gt;
</description>
    </item>
    
  </channel>
</rss>
