<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[malivinayak]]></title><description><![CDATA[malivinayak]]></description><link>https://blog.malivinayak.com</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 07:24:09 GMT</lastBuildDate><atom:link href="https://blog.malivinayak.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How an LSTM updates its memory]]></title><description><![CDATA[What we are going to see
Today we are going to deep dive into the LSTM circuit. How exactly the calculations work and how LSTM forget the old information and update the new information.
For the sec of]]></description><link>https://blog.malivinayak.com/how-an-lstm-updates-its-memory</link><guid isPermaLink="true">https://blog.malivinayak.com/how-an-lstm-updates-its-memory</guid><category><![CDATA[LSTM]]></category><category><![CDATA[llm]]></category><category><![CDATA[ML]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[Machine Learning]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Tue, 02 Jun 2026 15:54:54 GMT</pubDate><content:encoded><![CDATA[<h3>What we are going to see</h3>
<p>Today we are going to deep dive into the LSTM circuit. How exactly the calculations work and how LSTM forget the old information and update the new information.</p>
<p>For the sec of clear understanding we are going to go as per 2 sentences</p>
<pre><code class="language-plaintext">John is a doctor.
Mary is a teacher 
</code></pre>
<p>So complete sentence became <code>John is a doctor. Mary is a teacher.</code></p>
<blockquote>
<p>Our job is to predict the gender on each word using LSTM</p>
</blockquote>
<h3>Why I am writing this</h3>
<p>One of my junior ask me a question</p>
<pre><code class="language-plaintext">Heyy I'm reading this blog by colah on LSTM...I have some doubts...

                (LSTM Diagram is attached)

So here we have 3 things 
1) C(t-1) cell state long term memory 
2) H(t-1) info from last iteration 
3) Xt current input

Lets say we have 2 sentence 
John is a doctor 
Mary is a teacher 

Now let's say C(t-1) had stored things like 
    subject=john, gender = male
Current input is Mary...
now model wants to forget gender = male... 

So we take f(W(h(t-1),Xt))...
means we applied sigmoid on current input and past iteration info...
which will generate vector.. let's say [0,1,0,0,1] 
then we multiply it with Cell state...
and it will forget some things, remember something based on 0 and 1...
now my que is...
how the hell... it calculated what to remove in cell state 
by looking at current input
</code></pre>
<p>Understanding how it works is a one thing and explaining it effectively is completely different thing.</p>
<p>So today I am going to try to explain this with the help of this blog and same example. I am also in learning phase, so if any there is any mistake please feel free to address in comment section.</p>
<hr />
<h3>Some thermotical stuff before mathematical</h3>
<p>☑️ Pre-requisite: I am assuming you have basic understanding of how LSTM work.</p>
<p>In LSTM we have 3 gates:</p>
<ol>
<li><p>Forget Gate - What information should be forget/erase from cell state</p>
</li>
<li><p>Input Gate - What new information should we update in input state</p>
</li>
<li><p>Output Gate - What information from current cell state pass to new hidden state</p>
</li>
</ol>
<blockquote>
<p>So, just to be clear output gate doesn't play any role in updating cell state. Cell state is affected by <code>Forget Gate</code> and <code>Input Gate</code>.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6523a6820b798fd475b496f3/50d01f2a-5d83-43b8-a710-0c811a34c978.png" alt="" style="display:block;margin:0 auto" /></blockquote>
<p>Does Forget gate and Input gate have idea what's in cell state ❓</p>
<p>➡️ NOT REALLY ❌</p>
<p>Forget gate never looks at cell state. Lets take a look at equation of forget gate</p>
<p>$$f_t = \sigma \left( W_f \cdot [h_{t-1}, x_t] + b_f \right)$$</p>
<p>If we observe equation carefully <code>C_t-1</code> <strong>previous cell state</strong> is not present. It means forget gate does not have any idea about where the gender value stored in memory. It is blind for what present in cell state.</p>
<hr />
<p>Then question remain same <code>"how did it know what to remove by looking at the input❓"</code></p>
<p>➡️The answer is <strong>it didn't know.</strong> It's not reading the cell state and reasoning "ah, gender is in there, let me clear it." It's just emitting a vector of gates from the input alone.</p>
<p><em>Then why does the mask happen to zero out exactly the gender slot?</em><br />Because the weights W_f​ are learned during training.</p>
<p>The read and write for particular cell is agreed while training as this will be a gender cell. It is not mention anywhere its just understanding due to weights calculation and backpropagation. When gender is predicted for "Mary is a teacher" and if output came as <code>male</code> then that loss is back propagated, weights are updated. LSTM learns that gender slot should be cleared when input word <code>Mary</code> a new subject came. The embeddings of input carry information of, if the current input is subject or not. If yes then what is its gender male or female.<br />So the next time input patterns resemble LSTM forget gate knows I have to forget the gender information and input gate knows I have to write the new information there.</p>
<hr />
<h3>Small Mathematical Example before actual calculation</h3>
<p>Lets say <code>Mary</code> word came. In LSTM</p>
<ul>
<li><p>0: Forget</p>
</li>
<li><p>1: Keep the information</p>
</li>
</ul>
<p>Assuming 3rd cell is as gender cell.<br /><code>Positive</code> value represent <strong>male</strong> gender and<br /><code>Negative</code> value represent <strong>female</strong> gender.</p>
<p>$$C_t = {f_t \odot C_{t-1}} + {i_t \odot \tilde{C}_t}$$</p>
<table>
<thead>
<tr>
<th>state</th>
<th>1</th>
<th>2</th>
<th>3 (gender)</th>
<th>4</th>
</tr>
</thead>
<tbody><tr>
<td>Old Cell : C_t-1</td>
<td>0.6</td>
<td>-0.3</td>
<td>+0.9 (male)</td>
<td>0.5</td>
</tr>
<tr>
<td>x Forget</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>= erased</td>
<td>0.6</td>
<td>-0.3</td>
<td>0</td>
<td>0.5</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>+ write</td>
<td>0</td>
<td>0</td>
<td>-0.8</td>
<td>0</td>
</tr>
<tr>
<td>= new cell : C_t</td>
<td>0.6</td>
<td>-0.3</td>
<td>-0.8 (Female)</td>
<td>0.5</td>
</tr>
</tbody></table>
<p>So here you can see forget gave value 0 for 3rd cell and the previous value get erased from cell state.<br />Later at input gate:<br />i_t : provide at which cell the value should be updated and with what<br />C~_t : proposed value to update</p>
<hr />
<h3>Mathematical stuff for complete sentence</h3>
<p><strong>Concerted input z</strong></p>
<p>$$z = \left[ h_{\text{prev}},(3\ \text{dims}) \middle| x_{\text{embedding}},(3\ \text{dims}) \right]$$</p>
<p>So, <code>h has h1, h2, h3</code> and <code>x_embeddins are x1, x2, x3</code> for input word</p>
<p>Example:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6523a6820b798fd475b496f3/6189cd65-256f-4d9f-a4c9-4f50127b7494.png" alt="" style="display:block;margin:0 auto" />

<p>Each gate has one weight row per memory slot.  column 3 controls the <strong>gender slot.</strong> Therefore <code>h3</code> will represent gender value upto the current word. In this example <code>h_3 is 0.58</code> it means the current statement has <code>male</code> subject so 'He' can be used. if value is <code>&lt;0.5</code> then gender will be predicted as <code>female</code> so <code>She</code> can be used.</p>
<hr />
<p>Now let's see weight vectors for respective gates along with bias</p>
<ol>
<li><p>W_f : Forget Gate with<br />Bias: +3<br />Here x_1 will be -5 as we want to forget gender cell</p>
<table style="min-width:150px"><colgroup><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col></colgroup><tbody><tr><td><p>0</p></td><td><p>0</p></td><td><p>0</p></td><td><p><strong>-5</strong></p></td><td><p>0</p></td><td><p>0</p></td></tr><tr><td><p>h1</p></td><td><p>h2</p></td><td><p>h3</p></td><td><p><strong>x1</strong></p></td><td><p>x2</p></td><td><p>x3</p></td></tr></tbody></table>
</li>
<li><p>W_i: Input Gate<br />Bias: -2<br />Here x_1 will be 5 as we want to update gender cell</p>
<table style="min-width:150px"><colgroup><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col></colgroup><tbody><tr><td><p>0</p></td><td><p>0</p></td><td><p>0</p></td><td><p><strong>5</strong></p></td><td><p>0</p></td><td><p>0</p></td></tr><tr><td><p>h1</p></td><td><p>h2</p></td><td><p>h3</p></td><td><p><strong>x1</strong></p></td><td><p>x2</p></td><td><p>x3</p></td></tr></tbody></table>
</li>
<li><p>W_c: Candidate<br />Bias: +0<br />Here x_2 will be <code>5</code> and x_3 will be <code>-5</code> as <code>male/female</code> value will be decided</p>
<table style="min-width:150px"><colgroup><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col></colgroup><tbody><tr><td><p>0</p></td><td><p>0</p></td><td><p>0</p></td><td><p>0</p></td><td><p><strong>5</strong></p></td><td><p><strong>-5</strong></p></td></tr><tr><td><p>h1</p></td><td><p>h2</p></td><td><p>h3</p></td><td><p>x1</p></td><td><p><strong>x2</strong></p></td><td><p><strong>x3</strong></p></td></tr></tbody></table>
</li>
<li><p>W_o: Output Gate<br />Bias: +2</p>
<table style="min-width:150px"><colgroup><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col><col style="min-width:25px"></col></colgroup><tbody><tr><td><p>0</p></td><td><p>0</p></td><td><p>0</p></td><td><p>0</p></td><td><p>0</p></td><td><p>0</p></td></tr><tr><td><p>h1</p></td><td><p>h2</p></td><td><p>h3</p></td><td><p>x1</p></td><td><p>x2</p></td><td><p>x3</p></td></tr></tbody></table></li>
</ol>
<hr />
<p>For consistency and for better understanding I have generated interactive html file from Claude by giving rough calculations.</p>
<blockquote>
<p>Sentence : <code>John is a doctor. Mary is a teacher.</code></p>
</blockquote>
<p>Now lets see how exactly gender cell value is calculated.</p>
<p>Website Link: <a href="https://malivinayak.com/LSTM-Gender-Prediction/">Click Here</a></p>
<p>URL: <a href="https://malivinayak.com/LSTM-Gender-Prediction/">https://malivinayak.com/LSTM-Gender-Prediction/</a></p>
<hr />
<blockquote>
<p>THANK YOU 😊</p>
</blockquote>
<hr />
<h3>Resources:</h3>
<ul>
<li><p><a href="https://colah.github.io/posts/2015-08-Understanding-LSTMs/">https://colah.github.io/posts/2015-08-Understanding-LSTMs/</a></p>
</li>
<li><p><a href="http://Claude.com">Claude.com</a></p>
</li>
</ul>
<hr />
]]></content:encoded></item><item><title><![CDATA[20 LLM Interview Questions to Test Your Readiness]]></title><description><![CDATA[If you can’t answer half, you’re not ready 👇
LLM Fundamentals
1. Explain tokenization beyond “splitting text”.
2. Why do decoder-only models dominate? When would you prefer encoder-decoder?
3. Walk m]]></description><link>https://blog.malivinayak.com/20-llm-interview-questions-to-test-your-readiness</link><guid isPermaLink="true">https://blog.malivinayak.com/20-llm-interview-questions-to-test-your-readiness</guid><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Tue, 02 Jun 2026 04:17:44 GMT</pubDate><content:encoded><![CDATA[<p>If you can’t answer half, you’re not ready 👇</p>
<h3>LLM Fundamentals</h3>
<p>1. Explain tokenization beyond “splitting text”.</p>
<p>2. Why do decoder-only models dominate? When would you prefer encoder-decoder?</p>
<p>3. Walk me through attention. Where do queries, keys, values actually get used</p>
<p>4. Sampling strategies: top-K vs top-P vs temperature. When do you pick which?</p>
<p>Prompting &amp; Context Engineering</p>
<p>5. Give me an example of a zero-shot prompt failing. How did you fix it?</p>
<p>6. How do you version and test prompts for stability?</p>
<p>7. Explain “context window waste.” How do you mitigate it?</p>
<h3>Fine-Tuning &amp; Alignment</h3>
<p>8. LoRA vs QLoRA vs PEFT - where do you trade off memory, speed, accuracy?</p>
<p>9. What are the limits of RLHF? Give one real failure mode.</p>
<p>10. When would you choose open-source over proprietary LLMs for fine-tuning?</p>
<p>RAG (Retrieval-Augmented Generation)</p>
<p>11. Walk through how embeddings + similarity search actually work.</p>
<p>12. Chroma vs Pinecone vs Weaviate - what’s your POV?</p>
<p>13. When does hybrid retrieval outperform vanilla vector search?</p>
<h3>Agentic AI</h3>
<p>14. Define an agent without buzzwords.</p>
<p>15. How do you handle tool-use errors in an agent loop?</p>
<p>16. What’s the hardest part of multi-agent orchestration?</p>
<h3>MLOps / LLMOps</h3>
<p>17. How would you monitor hallucinations in production?</p>
<p>18. What metrics do you track in an eval pipeline?</p>
<p>19. How do you deploy a GenAI service (FastAPI + Docker + K8s) with rollback safety?</p>
<h3>Scaling &amp; Risk</h3>
<p>20. Your system just blew the budget because of model size. Walk me through trade-off options in 3 minutes.</p>
<div>
<div>🔗</div>
<div>Source: LinkedIn Post</div>
</div>

<hr />
<blockquote>
<p>👉 Self-test: Can you answer these out loud, clearly, without hand-waving? If not, that’s your prep gap.</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Journey of ML Algorithms]]></title><description><![CDATA[Warm welcome to everyone. You are going to join one of the best journey in ML Algorithms.
If you are already a companion of compiler journey then you already know the stop concept in our journey. For ]]></description><link>https://blog.malivinayak.com/journey-of-ml-algorithms</link><guid isPermaLink="true">https://blog.malivinayak.com/journey-of-ml-algorithms</guid><category><![CDATA[ML]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[gen ai]]></category><category><![CDATA[classification]]></category><category><![CDATA[generative ai]]></category><category><![CDATA[llm]]></category><category><![CDATA[LLM's ]]></category><category><![CDATA[#VAE]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Tue, 02 Jun 2026 04:12:42 GMT</pubDate><content:encoded><![CDATA[<p>Warm welcome to everyone. You are going to join one of the best journey in ML Algorithms.</p>
<p>If you are already a companion of compiler journey then you already know the stop concept in our journey. For those who are joining us first time lets start with the journey manual. In this journey we are going to take a time to time stops. At each stop we are going to learn a machine learning algorithm. Feel free to ask question at any point of time in the journey. For this you can use the comment section present below. I will try to whisper there the answers and if required then we will take a small stop (blog) to properly resolve the query.</p>
<p>In this journey at each stop we are going to either understand <code>Discriminative</code> algorithm or <code>Generative</code> algorithm. Each algorithm may required one or multiple stops.</p>
<div>
<div>💡</div>
<div>Small visiting points list of our journey</div>
</div>

<pre><code class="language-plaintext">ML Algorithms
    - Discriminative
        - Classification
            - Logistic Regression
            - Decision Trees
            - Neural Networks
            - SVM
            - k-Nearest Neighbor
        - Regression
            - Linear Regression
            - Decision Trees
            - k-Nearest Neighbor
            - Neural Networks
    - Generative
        - Text Generation
            - RNNs (GRU, LSTM)
        - Image Generation
            - VAE
            - GANs
            - Diffusion Models
            - Autoregressive Models
            - Flow-based Models
        - Audio Generation
            - VAE
            - Autoregressive Models
        - Video Generation
            - Diffusion Models
            - Autoregressive Models
</code></pre>
<blockquote>
<p>Note: I may update the list time to time as per requirements current world as well as requirements of you as a traveler</p>
</blockquote>
<p>Wait but haven't we all learn ML algorithms have mainly 3 types:</p>
<ol>
<li><p>Supervised Learning</p>
</li>
<li><p>Unsupervised Learning</p>
</li>
<li><p>Reinforcement Learning</p>
</li>
</ol>
<p>Then why aren't we seeing this kind of type in our journey.</p>
<p>Ok then, I will tell you how exactly ML algorithms are</p>
<pre><code class="language-plaintext">ML Algorithms
    - Supervised and Unsupervised
        - Discriminative
        - Generative
    - Reinforcement Learning
</code></pre>
<p>So, In this journey we are going to learn algorithms one by one and every stop. At some stops we are going to take numerical drinks or coded food so that we can learn not just theory but also what's happening behind it.</p>
<blockquote>
<p>🚍 LET'S BEGIN THE JOURNEY TOGETHER.</p>
</blockquote>
<p>See you at the next stop, till then stay tuned 😊</p>
]]></content:encoded></item><item><title><![CDATA[What is Agentic AI ?]]></title><description><![CDATA[Lets first understand how you complete your task using LLM
→ In order to get some task done you give repetitive prompts to LLM model, may be to improve the answer or to change the approach or to corre]]></description><link>https://blog.malivinayak.com/what-is-agentic-ai</link><guid isPermaLink="true">https://blog.malivinayak.com/what-is-agentic-ai</guid><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Fri, 17 Apr 2026 17:42:32 GMT</pubDate><content:encoded><![CDATA[<p>Lets first understand how you complete your task using LLM</p>
<p>→ In order to get some task done you give repetitive prompts to LLM model, may be to improve the answer or to change the approach or to correct the mistake.</p>
<p>In agentic AI rather than repetitively prompting LLM you gave it a goal and then next important thing you give is tools by which it can do/test things by its own.</p>
<p>So in simple words:</p>
<p><code>Agentic = LLM + Goal + Tools</code></p>
<p>This will start doing the task if fail then automatically change or improve the approach. It will fix the bug created during process. It will continue self repetitive improvement till goal gets achieved.</p>
<blockquote>
<p>Agentic AI is a dream of AUTONOMY.</p>
</blockquote>
<p>😊-X- THANK YOU -X- 😊</p>
]]></content:encoded></item><item><title><![CDATA[CUDA Configuration for Windows]]></title><description><![CDATA[Step 1: NVIDIA Video Driver
You should install the latest version of your GPUs driver. - Check which GPU is present in your system
You can download drivers here:

NVIDIA GPU Drive Download

How to che]]></description><link>https://blog.malivinayak.com/cuda-configuration-for-windows</link><guid isPermaLink="true">https://blog.malivinayak.com/cuda-configuration-for-windows</guid><category><![CDATA[cuda]]></category><category><![CDATA[NVIDIA]]></category><category><![CDATA[GPU]]></category><category><![CDATA[Windows]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Wed, 08 Apr 2026 09:43:19 GMT</pubDate><content:encoded><![CDATA[<h2>Step 1: NVIDIA Video Driver</h2>
<p>You should install the latest version of <code>your GPUs</code> driver. - Check which GPU is present in your system</p>
<p>You can download drivers here:</p>
<ul>
<li><a href="https://www.nvidia.com/Download/index.aspx">NVIDIA GPU Drive Download</a></li>
</ul>
<p>How to check if already present</p>
<pre><code class="language-shell">1. Device Manager Press Win + X
2. click Device Manager 
3. Expand Display adapters 
4. Look for something like: NVIDIA GeForce / RTX / GTX…
</code></pre>
<hr />
<h2>Step 2: Visual Studio C++</h2>
<p>You will need Visual Studio, with C++ installed.</p>
<p>🛑<code>IMP: By default, C++ is not installed with Visual Studio, so make sure you select ALL of the C++ options.</code></p>
<ul>
<li><a href="https://visualstudio.microsoft.com/vs/community/">Visual Studio Community Edition</a></li>
</ul>
<hr />
<h2>Step 3: Anaconda/Miniconda</h2>
<p>You will need anaconda to install all deep learning packages</p>
<ul>
<li><a href="https://www.anaconda.com/download/success">Download Anaconda</a></li>
</ul>
<hr />
<h2>Step 4: CUDA Toolkit</h2>
<p>Which version to choice:</p>
<p>Go to <a href="https://pytorch.org/get-started/locally/">https://pytorch.org/get-started/locally/</a></p>
<p>Check which stable version is available for pytorch: example CUDA 11.8 and CUDA 12.1 but not CUDA 12.4</p>
<p>Recommended as per following image: So you can ether install 11.8 or 12.1 [If you plan to use pytorch]</p>
<img src="https://cdn.hashnode.com/uploads/covers/6523a6820b798fd475b496f3/5462c8b6-782e-4ef9-a78e-e35344b2100c.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li><a href="https://developer.nvidia.com/cuda-toolkit-archive">Download CUDA Toolkit</a></li>
</ul>
<p>How to verify if downloaded or not: <code>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA</code> Here you will see the downloaded version folder</p>
<hr />
<h2>Step 5: cuDNN</h2>
<p>GPU accelerated library of primitives for deep neural networks</p>
<ul>
<li><a href="https://developer.nvidia.com/rdp/cudnn-archive">Download cuDNN</a></li>
</ul>
<p>Download the version which is suitable for your CUDA version</p>
<p>Next Step:</p>
<p>Unzip the downlaoded folder</p>
<p>Copy all bin folder files from cuDNN to <code>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8</code> bin folder --- [Note I have CUDA 12.8 so by dir path include v12.8 check yours]</p>
<p>same copy paste all files for <code>include</code> and <code>lib</code> folder too</p>
<hr />
<h2>How to verify if everything is correctly done</h2>
<p>Check for the environment variable set or not</p>
<p>If it is set automatically then everything is perfect if not then set manually</p>
<img src="https://cdn.hashnode.com/uploads/covers/6523a6820b798fd475b496f3/6a51b291-96e2-494b-9eb8-1379de7054b2.png" alt="" style="display:block;margin:0 auto" />

<h2>Step 6 Verification if system is using CUDA</h2>
<h2>Install PyTorch</h2>
<p>select the cuda version you installed and all other options as per requirement</p>
<p>Recommendation: You can test this in virtual env too</p>
<ul>
<li><a href="https://pytorch.org/get-started/locally/">Install PyTorch</a></li>
</ul>
<h2>Run the following script to test your GPU</h2>
<pre><code class="language-python">import torch

print("Number of GPU: ", torch.cuda.device_count())
print("GPU Name: ", torch.cuda.get_device_name())


device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
print('Using device:', device)
</code></pre>
<hr />
<p><strong><mark class="bg-yellow-200 dark:bg-yellow-500/30">-x- 😊 THANK YOU 😊 -x-</mark></strong></p>
]]></content:encoded></item><item><title><![CDATA[How to move Towards PhD Life 😊]]></title><description><![CDATA[Hello readers, today I am writing the article for you considering my point of view. As I am going to complete my masters form IIT Kharagpur in few months, I am currently collecting the information to PhD studies.
“Moving Towards our beautiful PhD Lif...]]></description><link>https://blog.malivinayak.com/towards-beautiful-phd-life</link><guid isPermaLink="true">https://blog.malivinayak.com/towards-beautiful-phd-life</guid><category><![CDATA[phd]]></category><category><![CDATA[higher education]]></category><category><![CDATA[iit]]></category><category><![CDATA[Mtech Degree,]]></category><category><![CDATA[research]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Sun, 11 Jan 2026 11:49:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768132580984/60fda506-8dea-466c-bf33-18f42094f76a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hello readers, today I am writing the article for you considering my point of view. As I am going to complete my masters form IIT Kharagpur in few months, I am currently collecting the information to PhD studies.</p>
<p>“Moving Towards our beautiful PhD Life“ is raw information article and this is collection of information after listening multiple IIT students/videos.</p>
<p><strong>Sorry for the unstructured format.</strong> I am watching multiple videos and listing to multiple IIT friends to collect the information and updating in one place. Once enough data is get collected.</p>
<p>Now lets move towards actual content but before that</p>
<blockquote>
<p>Please Not that the information is not certain as different things are coming in view from different people. This is blog is genuine attempt to generalize and collect things together. THANK YOU 😊</p>
</blockquote>
<h2 id="heading-requirements">Requirements</h2>
<p>CGPA matters in academics. It directly reflects how good you are in studies atleast in academics. It is also related to seriousness. If your CGPA is not that good then be serious make a strong research profile and then start looking for the professors. Important is research.</p>
<ul>
<li>CGPA &gt; 8 will be fine</li>
</ul>
<hr />
<h2 id="heading-phd-from-india-or-foreign">PhD from India or foreign?</h2>
<p>If you get PMRF scholarship then getting PhD from India is like more beneficial. With the PMRF scheme you will be reviewed by all the professors from across IIT’s.</p>
<p>PhD from wither India or Foreign doesn’t matter when you have very strong research.</p>
<h3 id="heading-if-foreign-then-which-place-is-good">If foreign then which place is good?</h3>
<p>Most best place is Europe.</p>
<p>Germany is best as there is less researchers and they are looking for researcher. [Start learning German from now]. First look for guide. German government is more supportive. Tuition fee is less than other countries. German is must and you have to complete A2 level course.</p>
<p>Switzerland is also good place.</p>
<hr />
<h2 id="heading-why-phd">Why PhD ?</h2>
<ul>
<li><p>I want to do PHD</p>
</li>
<li><p>Want deeper research in domain and enhance the knowledge of that domain</p>
</li>
</ul>
<h2 id="heading-benefits-of-phd">Benefits of PhD ?</h2>
<ul>
<li><p>More Growth opportunities than Masters Degree</p>
</li>
<li><p>Tremendous knowledge of particular domain</p>
</li>
<li><p>Patience</p>
</li>
<li><p>To join top research institute like IIT’s as a Professor</p>
</li>
<li><p>In senior positions highest educational degrees contribute for promotion</p>
</li>
</ul>
<hr />
<h2 id="heading-phd-fee-structure">PhD Fee Structure ?</h2>
<ul>
<li><p>25,000 ₹ per semester</p>
<ul>
<li><p>In Part-Time PhD fees</p>
<ul>
<li><p>Self-Sponsored: You yourself pay the fees</p>
</li>
<li><p>Company-Sponsored: Company where you are employed will pay the fees<br />  [Need to sign bond as you will serve to company for particular years after degree completion]</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr />
<h2 id="heading-types-of-phd">Types of PhD ?</h2>
<ol>
<li><p>Full Time PhD</p>
</li>
<li><p>Part-Time PhD</p>
<ol>
<li><p>Self Sponsored</p>
</li>
<li><p>Company Sponsored</p>
</li>
</ol>
</li>
</ol>
<p><strong>Full Time PhD</strong> - Student staying in campus and delicately doing research under supervision of professor</p>
<ul>
<li><p>Stiped is getting from government of India or MHRD (Ministry of Human Resource Development)</p>
</li>
<li><p>Or you can join as project PhD also. Then you are part project. Your thesis will be part of project. Your stipend will be coming from that project funding only.</p>
</li>
</ul>
<p><strong>Part Time PhD</strong> - Working in the company and at the same time you are pursuing your PhD parallelly under supervision of some guides</p>
<ul>
<li><p>In College:</p>
<p>  Apply with research proposal and application along with NoC.<br />  Appear for written exam interview in campus.</p>
</li>
<li><p>Requirements and Procedure:</p>
<ol>
<li><p>You should be in R&amp;D role in company and minimum 2 years in company</p>
</li>
<li><p>Company should be well known and should be existing more than 10 years in market<br /> Why this is matters is PhD is going to take next 4-6 years and company is going to pay indirectly complete fees. [Company gives to you and you pays fees]<br /> There is agreement between institute and company like you will be working for company and you are doing part time PhD</p>
</li>
<li><p>Managers approval is very very important</p>
</li>
<li><p>Talk with professor and check which professor is interested in part time PhD</p>
</li>
</ol>
</li>
</ul>
<hr />
<h2 id="heading-application-process">Application Process</h2>
<p>Recruitment happens twice in the year/Application opens twice year 1. July 2. December</p>
<ul>
<li><p>Documents required</p>
<ul>
<li><p>Sponsorship Certificate/Agreement from company [If Part Time PhD]<br />  States that company is going to take care of all expense. e.g. college fees, if paper is going for conference then that expense, travelling cost, staying cost<br />  There is pre defined form for all institutes we have to take sign on that from company</p>
</li>
<li><p>Industry guide CV<br />  There is another guide from company end. He is the most of the time manager your project</p>
</li>
</ul>
</li>
<li><p>Research Profile. You should be in research profile in company</p>
</li>
<li><p>Research proposal<br />  Most if the time guides are not interested in reading your proposal so you should talk with them or there research scholars.<br />  Also relate and mention how the professors work or part of work is related in you work/proposal</p>
</li>
</ul>
<p>Written Exam:<br />[For part time students most of the times no written test]</p>
<ul>
<li>20 Subjective questions all from gate syllabus. After exam Interview.</li>
</ul>
<p>Interview:</p>
<ul>
<li><p>Multiple panels, each with 8 to 10 professors. [with your guide too]</p>
</li>
<li><p>Answer back to back questions on board.</p>
</li>
</ul>
<hr />
<h2 id="heading-what-after-selection">What after selection</h2>
<p>First 6 to 10 month we have to do course work.</p>
<p>IIT KGP - 4 courses<br />ISSC - 3 courses</p>
<p>For part time students NPTEL courses<br />Some students take 6 months of leave, complete the course and then join the company again. They talk with supervisor to setup with MTech and BTech students. Being an PhD student you just formulate the problem and then the MTech BTech student work on it, implement, generate result and then you write then paper. It is kind of team work thing.</p>
<hr />
<h2 id="heading-how-to-choice-guide">How to choice guide ?</h2>
<p>Shortlist the professor which align with your research domain. Connect with the student who are working with that professor. Ask the students for the feedback about guide.</p>
<p>Que to ask to students working with professor:</p>
<ol>
<li><p>How much support they give</p>
</li>
<li><p>How much time he spent/talk with you about project</p>
</li>
<li><p>DO they are asking for extra work which is not at all research work</p>
</li>
<li><p>are they inspiring you or torturing you</p>
</li>
</ol>
<p>Choice the guide only and only all are green ticks.</p>
<blockquote>
<p>If any professor is reading this article then my senior apologies if you are getting offended in any way. This article is with perspective of students and everything mentioned is common in multiple PhD students perspective.</p>
</blockquote>
<p>You should have complete information about the guide. <strong>Remember the guide should be very supportive.</strong> The bonding between guide and student is very important.</p>
<p><strong>Guide can either make you or break you.</strong></p>
<p>Once you finalized one or two guides, mail them like sir this is my PhD perceptive, if they give some positive feedback then only it make sense to choice the guide.</p>
<h2 id="heading-what-requires-to-complete-the-phd">What requires to complete the PhD ?</h2>
<ul>
<li><p>minimum 2-4 research paper in A* conference<br />  Quality matters. Incremental changes are not good.</p>
</li>
<li><p>Thesis Defense</p>
</li>
</ul>
<h2 id="heading-how-to-complete-phd-on-time">How to complete PhD on time ?</h2>
<p>First of your goal should be clear. You should have clear path like you have to do in first year this , in second year this. like that.</p>
<p>Also keep the guide in loop like you are going to do this, are there any suggestion or shall I move forward. You need the clear communication that this is my AIM and after that I am expecting the PhD.</p>
<p>Make sure your synopsis is completed in 3 or 3<strong>½ then another 6 months to write thesis.</strong></p>
<h2 id="heading-what-require-to-become-iit-professor">What require to become IIT Professor</h2>
<p>PhD Degree is mandatory. If you have post doc experience which is from outside India then it add more value in your application.</p>
<ul>
<li><p>Complete PhD with certificate</p>
</li>
<li><p>Post Doc around 1 year</p>
</li>
</ul>
<blockquote>
<p>The detailed information will be some other article/blog.</p>
</blockquote>
<hr />
<h2 id="heading-resources">Resources:</h2>
<ol>
<li><p>My IITian Friends, PhD scholars, Friends and every person who helped be getting any part of information.</p>
</li>
<li><p><a target="_blank" href="https://www.youtube.com/watch?v=qpZUfyFzjM0">PhD from IIT Kharagpur while working at Qualcomm || PhD for working Professional || Part time PhD</a></p>
</li>
<li><p><a target="_blank" href="https://www.youtube.com/watch?v=OtjLQURXC84"><strong>RF Engineer at Qualcomm : How to become IIT'S Professor :-with Priyansha , Assistant Professor @ IIT Roorkee</strong></a><br /> <strong>Completed PhD in 3.1 year and then start postdoc in 3½ years then defense and convocation is completed in 4 years.</strong></p>
</li>
<li><p><a target="_blank" href="https://www.youtube.com/watch?v=dQDKw2vQuU8">Selection Procedure for IIT'S Professor :- with Priyansha , Assistant Professor @ IIT Roorkee</a></p>
</li>
<li><p><a target="_blank" href="https://www.youtube.com/watch?v=2FdkHCWQlOs">HOW to Pursue a PhD While Working - Kishalay Das</a></p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[GenAI-1: What is a Language Model?]]></title><description><![CDATA[We all heard about LLMs (Large Language Models), didn’t we ? but before understanding Large Language Models What is Language Model ?
The language model is probability distribution over a sequence of tokens. The tokens can be anything like words, char...]]></description><link>https://blog.malivinayak.com/genai-1-what-is-a-language-model</link><guid isPermaLink="true">https://blog.malivinayak.com/genai-1-what-is-a-language-model</guid><category><![CDATA[AI]]></category><category><![CDATA[ML]]></category><category><![CDATA[genai]]></category><category><![CDATA[llm]]></category><category><![CDATA[chatgpt]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Thu, 18 Sep 2025 04:25:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1758169364547/b1460908-e728-432a-ac7a-cb83f4adf807.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We all heard about LLMs (Large Language Models), didn’t we ? but before understanding Large Language Models What is Language Model ?</p>
<p>The language model is probability distribution over a sequence of tokens. The tokens can be anything like words, characters or subwords in language. What it mean by probability distribution over sequence of tokens. Let’s understand it with simple example. Consider the words ‘the’, ‘flat’, ‘rat’, ‘ran’, ‘on’. The language model would give higher probability to the more sensible sentence due to greater likelihood of real-world usage and logical coherence.</p>
<p><code>P(‘the’, ‘rat’, ‘ran’, ‘on’, ‘flat’) = 0.03   P(‘the’, ‘rat’, ‘on’, ‘flat’, ‘ran’) = 0.02   P(‘on’, ‘flat’, ‘the’, ‘rat’, ‘ran’) = 0.01</code></p>
<p>Language models are applied to a wide range of tasks, from classification to generation.</p>
<p>Now, its time to explore <em>generative language models</em> more. So, the next question is</p>
<blockquote>
<p>What is Generative Language Models ?</p>
</blockquote>
<p>Thank You 😊, fellow traveler, for joining us on this Que Ans journey.</p>
]]></content:encoded></item><item><title><![CDATA[Adventures Journey of Question and Answer]]></title><description><![CDATA[Hello Fellow travelers, You all have decided to join this journey. This will be really long journey, we will understand every spot of concepts one by one.
You might catch a little sleep, but don’t worry—I’ll keep you notified at every adventures Que,...]]></description><link>https://blog.malivinayak.com/adventures-journey-of-question-and-answer</link><guid isPermaLink="true">https://blog.malivinayak.com/adventures-journey-of-question-and-answer</guid><category><![CDATA[AI]]></category><category><![CDATA[ML]]></category><category><![CDATA[genai]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Thu, 18 Sep 2025 04:17:56 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1758168963833/72c8a4de-9881-4be0-a51d-61ec49e09c40.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hello <strong>Fellow travelers,</strong> You all have decided to join this journey. This will be really long journey, we will understand every spot of concepts one by one.</p>
<p>You might catch a little sleep, but don’t worry—I’ll keep you notified at every adventures Que, if you'd like.</p>
<p>You can subscribe to get notified. 😊</p>
]]></content:encoded></item><item><title><![CDATA[How to install conda in Ubuntu]]></title><description><![CDATA[Install Miniconda (lightweight Conda)
1. Download the Miniconda installer:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

2. Run the installer:
bash Miniconda3-latest-Linux-x86_64.sh


⚠️ Follow the prompts — accept the l...]]></description><link>https://blog.malivinayak.com/how-to-install-conda-in-ubuntu</link><guid isPermaLink="true">https://blog.malivinayak.com/how-to-install-conda-in-ubuntu</guid><category><![CDATA[Ubuntu]]></category><category><![CDATA[condaenvironments]]></category><category><![CDATA[Installation]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Mon, 18 Aug 2025 04:56:23 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-install-miniconda-lightweight-conda">Install Miniconda (lightweight Conda)</h2>
<h3 id="heading-1-download-the-miniconda-installer">1. Download the Miniconda installer:</h3>
<pre><code class="lang-bash">wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
</code></pre>
<h3 id="heading-2-run-the-installer">2. Run the installer:</h3>
<pre><code class="lang-bash">bash Miniconda3-latest-Linux-x86_64.sh
</code></pre>
<blockquote>
<p>⚠️ Follow the prompts — accept the license, choose install location, and allow it to initialize Conda (recommended).</p>
</blockquote>
<h3 id="heading-3-restart-your-shell-or-run-this-now-to-enable-conda">3. Restart your shell (or run this now to enable conda):</h3>
<pre><code class="lang-bash"><span class="hljs-built_in">source</span> ~/.bashrc
</code></pre>
<h3 id="heading-4-check-where-miniconda-is-installed">4. Check where Miniconda is installed</h3>
<p>By default, it installs to your home directory, under:</p>
<pre><code class="lang-bash">~/miniconda3
</code></pre>
<p>Verify it exists:</p>
<pre><code class="lang-bash">ls ~/miniconda3
</code></pre>
<p>If you see folders like <code>bin</code>, <code>etc</code>, <code>envs</code>, then it’s installed correctly.</p>
<h3 id="heading-5-manually-add-conda-to-your-path">5. Manually add Conda to your PATH</h3>
<p>Run this command:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> PATH=<span class="hljs-string">"<span class="hljs-variable">$HOME</span>/miniconda3/bin:<span class="hljs-variable">$PATH</span>"</span>
</code></pre>
<p>Then test:</p>
<pre><code class="lang-bash">conda --version
</code></pre>
<p>If it works, proceed to initialize Conda:</p>
<pre><code class="lang-bash">conda init
</code></pre>
<h3 id="heading-6-make-the-path-change-permanent">6. Make the PATH change permanent</h3>
<p>To make the <code>PATH</code> available every time you open a terminal, add it to your <code>.bashrc</code> or <code>.zshrc</code>:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">'export PATH="$HOME/miniconda3/bin:$PATH"'</span> &gt;&gt; ~/.bashrc
<span class="hljs-built_in">source</span> ~/.bashrc
</code></pre>
<hr />
<p><strong>😊 Thank You 😊</strong></p>
]]></content:encoded></item><item><title><![CDATA[Compiler - Why and Where]]></title><description><![CDATA[So finally we are here, this is our First Stop of compiler journey. Are you excited for this stop ? Off course you are, RIGHT ! ! !
I guess title had already gave you hint of todays stop. If yes then you got me there otherwise let me explain it first...]]></description><link>https://blog.malivinayak.com/compiler-why-and-where-1</link><guid isPermaLink="true">https://blog.malivinayak.com/compiler-why-and-where-1</guid><category><![CDATA[compiler journey]]></category><category><![CDATA[compiler]]></category><category><![CDATA[preprocessor]]></category><category><![CDATA[C]]></category><category><![CDATA[Python]]></category><category><![CDATA[#CompilerDesign]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Fri, 19 Apr 2024 05:11:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1713355379072/20f308a3-cd73-434d-b892-0562132312da.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>So finally we are here, this is our <strong>First Stop</strong> of compiler journey. Are you excited for this stop ? Off course you are, RIGHT ! ! !</p>
<p>I guess title had already gave you hint of todays stop. If yes then you got me there otherwise let me explain it first then we will continue our talk. Also in subtitle why <em>speedbreaker</em>, because in order to understand the concepts clearly we need to slow down our speed and learn everything patiently. In this way we will not get a sudden jerk of new things.</p>
<p>Now, at this moment we are going to understand why exactly there is need of compiler and If we consider language processing diagram where is the compiler located . . .</p>
<p>Following is the plan for our stop :</p>
<ul>
<li><p>Why and where</p>
</li>
<li><p>Understanding semantic gap</p>
</li>
<li><p>How to overcome it</p>
</li>
</ul>
<h3 id="heading-why-and-where">Why and where</h3>
<p>If you are aware about steps of language processing then you might already know that compiler take pure high level language as input and generates assembly language as output. So, we can conclude that compiler is located after pre-processor and before assembler. Now, we got the answer about WHERE but what about WHY ?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713498243053/2570bd64-92eb-4e0b-abc1-194cf7bee3ae.png" alt class="image--center mx-auto" /></p>
<p>Lets travel back to get some insights . . .</p>
<h3 id="heading-semantic-gap">Semantic gap</h3>
<p>Grace Hopper is the one who first designed the compiler for A-O programming language in 1952. and if you are aware then he is often credited to pioneering the concept of compiler.</p>
<p>If you are thinking I am going to give you some history lectures then it's not going to happen, as I also get bored of it too. But it is good to know some of it and we will get back to the above sentence may be in future stop.</p>
<p>Imagine you want to design the software application, all you worried about is its behaviour. In order to execute that software or machine we need to write it into the machine language which is quite challenging.</p>
<p>HOLD TIGHT . . .</p>
<p>It may start confusing, so what we are going to do is analysing everything slowly one by one:</p>
<ol>
<li>You have an idea and want to develop an application/software. 2) This application should run/execute on computer system. 3) To run this application correctly it should have certain rules, cases or conditions. Now, let's break it down...</li>
</ol>
<ul>
<li><p>Application domain - The ideas and behaviour of the application that you want to develop</p>
</li>
<li><p>Execution domain - To implement ideas and execute, ideas should be interpreted for execution and that is execution domain</p>
</li>
<li><p>Semantics - Semantics means the rules of meaning of domain</p>
</li>
<li><p>Semantic gap - There is always a difference between our ideas and what we have implemented. this difference is nothing but semantic gap.</p>
</li>
</ul>
<div data-node-type="callout">
<div data-node-type="callout-emoji">🖥</div>
<div data-node-type="callout-text">Let's take a look on example:</div>
</div>

<blockquote>
<p>🛑 WARNING: Don't try to understand the code just take a look</p>
</blockquote>
<p>You want to develop simple addition program:</p>
<ul>
<li><p>Application domain<br />  Take two numbers, add them and then stop</p>
</li>
<li><p>Execution domain<br />  I am simply trying to visualize the machine code to you as per the architecture.</p>
<pre><code class="lang-yaml">  <span class="hljs-attr">Instruction:</span> <span class="hljs-string">Load</span> <span class="hljs-string">the</span> <span class="hljs-string">first</span> <span class="hljs-string">number</span> <span class="hljs-string">into</span> <span class="hljs-string">register</span> <span class="hljs-number">1</span>
  <span class="hljs-attr">Binary:</span> <span class="hljs-number">0001 </span><span class="hljs-number">0000</span> <span class="hljs-string">(Assume</span> <span class="hljs-number">0001 </span><span class="hljs-string">represents</span> <span class="hljs-string">the</span> <span class="hljs-string">load</span> <span class="hljs-string">operation</span> <span class="hljs-string">and</span> <span class="hljs-number">0000 </span><span class="hljs-string">represents</span> <span class="hljs-string">register</span> <span class="hljs-number">1</span><span class="hljs-string">)</span>
  <span class="hljs-attr">Decimal:</span> <span class="hljs-number">16</span>

  <span class="hljs-attr">Instruction:</span> <span class="hljs-string">Load</span> <span class="hljs-string">the</span> <span class="hljs-string">second</span> <span class="hljs-string">number</span> <span class="hljs-string">into</span> <span class="hljs-string">register</span> <span class="hljs-number">2</span>
  <span class="hljs-attr">Binary:</span> <span class="hljs-number">0010 </span><span class="hljs-number">0001</span> <span class="hljs-string">(Assume</span> <span class="hljs-number">0010 </span><span class="hljs-string">represents</span> <span class="hljs-string">the</span> <span class="hljs-string">load</span> <span class="hljs-string">operation</span> <span class="hljs-string">and</span> <span class="hljs-number">0001 </span><span class="hljs-string">represents</span> <span class="hljs-string">register</span> <span class="hljs-number">2</span><span class="hljs-string">)</span>
  <span class="hljs-attr">Decimal:</span> <span class="hljs-number">33</span>

  <span class="hljs-attr">Instruction:</span> <span class="hljs-string">Add</span> <span class="hljs-string">the</span> <span class="hljs-string">contents</span> <span class="hljs-string">of</span> <span class="hljs-string">register</span> <span class="hljs-number">1</span> <span class="hljs-string">and</span> <span class="hljs-string">register</span> <span class="hljs-number">2</span><span class="hljs-string">,</span> <span class="hljs-string">and</span> <span class="hljs-string">store</span> <span class="hljs-string">the</span> <span class="hljs-string">result</span> <span class="hljs-string">in</span> <span class="hljs-string">register</span> <span class="hljs-number">1</span>
  <span class="hljs-attr">Binary:</span> <span class="hljs-number">0011 </span><span class="hljs-number">0001</span> <span class="hljs-string">(Assume</span> <span class="hljs-number">0011 </span><span class="hljs-string">represents</span> <span class="hljs-string">the</span> <span class="hljs-string">add</span> <span class="hljs-string">operation</span> <span class="hljs-string">and</span> <span class="hljs-number">0001 </span><span class="hljs-string">represents</span> <span class="hljs-string">register</span> <span class="hljs-number">1</span><span class="hljs-string">)</span>
  <span class="hljs-attr">Decimal:</span> <span class="hljs-number">49</span>

  <span class="hljs-attr">Instruction:</span> <span class="hljs-string">Halt</span> <span class="hljs-string">the</span> <span class="hljs-string">program</span>
  <span class="hljs-attr">Binary:</span> <span class="hljs-number">1111 </span><span class="hljs-number">1111</span> <span class="hljs-string">(Assume</span> <span class="hljs-number">1111 </span><span class="hljs-string">represents</span> <span class="hljs-string">the</span> <span class="hljs-string">halt</span> <span class="hljs-string">operation)</span>
  <span class="hljs-attr">Decimal:</span> <span class="hljs-number">255</span>
</code></pre>
<pre><code class="lang-apache">  <span class="hljs-attribute">section</span> .data
      <span class="hljs-attribute">num1</span> dd <span class="hljs-number">10</span>       ; First number (<span class="hljs-number">32</span>-bit integer)
      <span class="hljs-attribute">num2</span> dd <span class="hljs-number">20</span>       ; Second number (<span class="hljs-number">32</span>-bit integer)

  <span class="hljs-attribute">section</span> .text
      <span class="hljs-attribute">global</span> _start

  <span class="hljs-attribute">_start</span>:
      ; <span class="hljs-attribute">Load</span> num<span class="hljs-number">1</span> into eax
      <span class="hljs-attribute">mov</span> eax,<span class="hljs-meta"> [num1]</span>

      ; <span class="hljs-attribute">Add</span> num<span class="hljs-number">2</span> to eax
      <span class="hljs-attribute">add</span> eax,<span class="hljs-meta"> [num2]</span>

      ; <span class="hljs-attribute">At</span> this point, eax contains the sum of num<span class="hljs-number">1</span> and num<span class="hljs-number">2</span>

      ; <span class="hljs-attribute">Exit</span> program
      <span class="hljs-attribute">mov</span> eax, <span class="hljs-number">1</span>       ; syscall number for exit
      <span class="hljs-attribute">xor</span> ebx, ebx     ; exit code <span class="hljs-number">0</span>
      <span class="hljs-attribute">int</span> <span class="hljs-number">0</span>x<span class="hljs-number">80</span>         ; invoke syscall
</code></pre>
</li>
</ul>
<blockquote>
<p>This is not the machine code its just for visualization purpose</p>
</blockquote>
<p>Because of Semantic gap you need to face many consequences, I am listing some important ones only:</p>
<ul>
<li><p>It take very large development time</p>
</li>
<li><p>It also need large development efforts</p>
</li>
<li><p>Final software quality will be poor</p>
</li>
</ul>
<p>The consequences arise because we try to develop application directly in machine language. and even if we achieve developing the executable software along with above issues it is really hard to make even a small change.</p>
<h3 id="heading-solution">Solution</h3>
<p>In order to tackle this issue we use software engineering approach by using methodologies and Programming Languages (<strong>PL</strong>s). So the the process will be in two steps:</p>
<ol>
<li><p>Specification, design and coding step (software developer who will use programming language)</p>
</li>
<li><p>PL implementation step (Programming language designer)</p>
</li>
</ol>
<p>Now we are going to take new domain which is ' PL domain '<br />Also by introducing new domain we bridged the semantic gap by engineering steps. We will understand what are this gap's are but first try to visualize what just happened.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713412253733/31d3fd25-2e1f-4b78-8c04-e472f6f25ebd.png" alt class="image--center mx-auto" /></p>
<p>The first step bridges the gap between application and PL domain and the second step bridges the gap between PL domain and execution domain.</p>
<ul>
<li><p>Gap between Application domain and PL domain is specification and design gap or simply <strong>Specification Gap</strong></p>
</li>
<li><p>Gap between PL domain and Execution domain is <strong>execution gap</strong>.</p>
</li>
</ul>
<blockquote>
<p>PL stands for Programming language</p>
</blockquote>
<h3 id="heading-how-it-works">How it works</h3>
<p>Software developer team will bridge the specification gap by taking specifications and requirements required for application. Then developer will develop the software with the help of any programming language. Now the important part is what about execution gap. But first what it mean by execution gap.<br />Execution gap is exist because developer will develop the application in programming language like c, cpp, python, ... etc. But machine can only understand only machine language then how we are going to resolve this issue. This issue is comes under execution gap.<br />The execution gap is bridged by the designer of the programming language processor, viz a translator or an interpreter.</p>
<ul>
<li><p>Specification gap - semantic gap between two specification of same task</p>
</li>
<li><p>Execution gap - semantics of program(that perform same task) written in different programming language.</p>
</li>
</ul>
<blockquote>
<p>Semantics can be referred as rules</p>
</blockquote>
<p>We are assuming a specification language (<strong>SL</strong>) for every domain. So specification written in SL is nothing but program in SL. e.g. specification written in C language is nothing but program in C.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Domain</td><td>Specification Language</td></tr>
</thead>
<tbody>
<tr>
<td>PL Domain</td><td>PL (Programming Language) e.g. C, CPP, . . .</td></tr>
<tr>
<td>Execution Domain</td><td>Machine Language of computer system</td></tr>
</tbody>
</table>
</div><div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">Let's take a look on example with PL domain:</div>
</div>

<blockquote>
<p>🛑 WARNING: Don't try to understand the code just take a look</p>
</blockquote>
<p>You want to develop simple addition program:</p>
<ul>
<li><p>Application domain<br />  Take two numbers, add them and then stop</p>
</li>
<li><p>PL domain<br />  We will use C programming language</p>
</li>
</ul>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span><span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>

<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span>{
    <span class="hljs-keyword">int</span> a,b;
    <span class="hljs-built_in">scanf</span>(<span class="hljs-string">"%d"</span>,&amp;a);
    <span class="hljs-built_in">scanf</span>(<span class="hljs-string">"%d"</span>,&amp;b);
    a = a + b;
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">"%d"</span>,a);
    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<ul>
<li>Execution domain<br />  Machine code based on compiler of C programming.</li>
</ul>
<p>Now you can see that we can easily make modifications with PL domain.</p>
<p>So far we have understand that, to develop an application we need to take help of programming language which further converted to machine language <strong><em>somehow</em></strong>.</p>
<blockquote>
<p>Our task is to understand that <em>somehow.</em></p>
</blockquote>
<div data-node-type="callout">
<div data-node-type="callout-emoji">🚏</div>
<div data-node-type="callout-text">THAT'S IT, WE HAVE TO GO NOW FOR NEXT STOP IN ORDER TO CONTINUE OUR JOURNEY.</div>
</div>

<h3 id="heading-faq"><strong>#FAQ</strong></h3>
<ol>
<li>How does machine code is generated ?</li>
</ol>
<p>In a real-world scenario, machine code is typically generated by an assembler, which translates assembly code into machine code specific to the target architecture. Writing machine code directly is extremely complex and error-prone. We already know from language processing diagram that compiler generates assembly language. This assembly language is used by assembler to generate machine code.</p>
<ol start="2">
<li>As of today 19-04-2024 who are enjoying the compiler journey ?</li>
</ol>
<p>As of today's date 19-04-2024 <a class="user-mention" href="https://hashnode.com/@AishPatil013">Aishwarya Patil</a> &amp; <a class="user-mention" href="https://hashnode.com/@paulbg">Paul Bogatyr</a> are enjoying our compiler journey. I would like to thank them for being my companion.</p>
<ol start="3">
<li>Where can I find the complete journey of compiler design ?</li>
</ol>
<p>You can go through the complete compiler journey by clicking <a target="_blank" href="https://malivinayak.hashnode.dev/series/compiler-journey"><strong><em>HERE</em></strong></a> or simply pasting following url in any browser.</p>
<pre><code class="lang-basic">https://malivinayak.hashnode.dev/series/compiler-journey
</code></pre>
<ol start="4">
<li>Is there anyway I could get notified at every STOP of journey ?</li>
</ol>
<p>There is always a way. You can subscribe to <strong>newsletter service</strong> in-order to get notified at every STOP. You can find it into the navbar on top right or at the bottom of page.</p>
]]></content:encoded></item><item><title><![CDATA[Journey of Compiler]]></title><description><![CDATA[🚏
We are waiting at the platform to board the compiler bus to start the journey.


Before starting the journey let's take a moment to understand what is this journey, why we are going anyway, where we will end, . . .
What is this Journey of Compiler...]]></description><link>https://blog.malivinayak.com/journey-of-compiler</link><guid isPermaLink="true">https://blog.malivinayak.com/journey-of-compiler</guid><category><![CDATA[#CompilerDesign]]></category><category><![CDATA[compiler]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Tue, 16 Apr 2024 04:57:22 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1713243171536/739611ce-ab9b-46bb-aaeb-5d41e287de0c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div data-node-type="callout">
<div data-node-type="callout-emoji">🚏</div>
<div data-node-type="callout-text">We are waiting at the platform to board the compiler bus to start the journey.</div>
</div>

<p>Before starting the journey let's take a moment to understand what is this journey, why we are going anyway, where we will end, . . .</p>
<h3 id="heading-what-is-this-journey-of-compiler">What is this Journey of Compiler ?</h3>
<p>Journey of Compiler Design is going to be the beautiful tour for all those who want to understand and learn about compiler. <em>Who can travel with me</em> - All of you who may have already learnt about compiler design or compiler construction subject in your bachelors' or may be those who are going to learn these subjects in future or maybe you are just enthusiastic and want to gain knowledge or just want to travel along with me for cheering me up.</p>
<p>On this journey we will get multiple stops.</p>
<p>WAIT.... WHAT</p>
<p>Did I just heard <strong>STOP</strong></p>
<p>"<strong>YES",</strong> you heard me right. We are on journey, Journey to explore the world of compiler from inside, outside and around. For this we have to stop from time to time to gain experience via eating some knowledge, drinking some concepts and digesting some applications. After this we will be energized and ready to proceed to the next stop where we will repeat the same with some progress.</p>
<h3 id="heading-why-we-are-going-anyway">Why we are going anyway ?</h3>
<p>As we discussed earlier this journey is for many types of companions. While travelling with me you can learn new concepts or revise it if you already know. The beautiful part of this journey is you will get to understand the application based conceptual knowledge step by step on each and every stop.</p>
<h3 id="heading-where-will-it-end">Where will it end ?</h3>
<p>I am not sure about ending stop as we are on never ending journey. In this computer and AI era there is enhancement in all part at every moment even at this moment also someone somewhere on something is working to innovate new or enhance old. In order to remain upto date we can't end this journey. We will be together from prerequisites to basic, from basics to advance, and from advance to emerging technologies related to compiler.</p>
<div data-node-type="callout">
<div data-node-type="callout-emoji">🚍</div>
<div data-node-type="callout-text">LET'S BEGIN THE JOURNEY TOGETHER.</div>
</div>]]></content:encoded></item><item><title><![CDATA[Characteristics of C Programming]]></title><description><![CDATA[There are 6 characteristics:

Keywords

Operators

Separators

Constant

Predefined Functions

Syntax


Keywords

Keywords are words that have special meaning to the C compiler.

An identifier can't have the same spelling and case as a C keyword. We ...]]></description><link>https://blog.malivinayak.com/characteristics-of-c-programming</link><guid isPermaLink="true">https://blog.malivinayak.com/characteristics-of-c-programming</guid><category><![CDATA[C]]></category><category><![CDATA[characteristics]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[Developer]]></category><dc:creator><![CDATA[Vinayak Mali]]></dc:creator><pubDate>Mon, 09 Oct 2023 11:40:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1696849890042/81346d9f-2a86-418e-a4f4-32d9dea453bf.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There are 6 characteristics:</p>
<ol>
<li><p>Keywords</p>
</li>
<li><p>Operators</p>
</li>
<li><p>Separators</p>
</li>
<li><p>Constant</p>
</li>
<li><p>Predefined Functions</p>
</li>
<li><p>Syntax</p>
</li>
</ol>
<h3 id="heading-keywords">Keywords</h3>
<ul>
<li><p>Keywords are <strong>words that have special meaning to the C compiler</strong>.</p>
</li>
<li><p>An identifier can't have the same spelling and case as a C keyword. We can't use keywords for our own purposes.</p>
</li>
<li><p>There are a total of 32 keywords in C which are as follows:</p>
</li>
</ul>
<div class="hn-table">
<table>
<thead>
<tr>
<td>auto</td><td>break</td><td>case</td><td>char</td></tr>
</thead>
<tbody>
<tr>
<td>const</td><td>continue</td><td>default</td><td>do</td></tr>
<tr>
<td>double</td><td>else</td><td>enum</td><td>extern</td></tr>
<tr>
<td>float</td><td>for</td><td>goto</td><td>if</td></tr>
<tr>
<td>int</td><td>long</td><td>register</td><td>return</td></tr>
<tr>
<td>short</td><td>signed</td><td>sizeof</td><td>static</td></tr>
<tr>
<td>struct</td><td>switch</td><td>typedef</td><td>union</td></tr>
<tr>
<td>unsigned</td><td>void</td><td>volatile</td><td>while</td></tr>
</tbody>
</table>
</div><h3 id="heading-operators">Operators</h3>
<ul>
<li><p>Special types of symbols i.e. are used to perform specific task</p>
</li>
<li><p>Types: Binary operator, Unary operator, Ternary operator, etc.</p>
</li>
<li><p>Total 44 operators are present</p>
</li>
</ul>
<h3 id="heading-separators">Separators:</h3>
<ul>
<li><p>Separate things called as a token</p>
</li>
<li><p>we can separate individual unit -&gt; token</p>
</li>
</ul>
<details><summary>What is Token</summary><div data-type="detailsContent">The smallest unit of c programming is known as a token. Token can be any keyword, operator, separator, constant, identifier, etc. We can give any number of spaces between tokens.</div></details>

<h3 id="heading-constant">Constant</h3>
<ul>
<li><p>Variable that doesn't change its value throughout the program is known as a constant.</p>
</li>
<li><p>Types:</p>
<ul>
<li><p>Alphanumeric constants -&gt; a-z, A-z, 0-9</p>
</li>
<li><p>Numeric constants -&gt; 0-9</p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-predefined-function">Predefined FUnction</h3>
<ul>
<li><p>all predefined functions are stored in respective header files.</p>
</li>
<li><p>e.g.</p>
<ul>
<li><p>stdio.h -&gt; printf(), scanf(), ...</p>
</li>
<li><p>math.h -&gt; sqrt(), ...</p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-syntax">Syntax</h3>
<ul>
<li><p>Syntax is the rules which need to be followed while developing a program</p>
</li>
<li><p>e.g. To declare variable syntax is - <code>data_type variable_name ;</code></p>
</li>
</ul>
]]></content:encoded></item></channel></rss>