<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ryena Dhingra on Medium]]></title>
        <description><![CDATA[Stories by Ryena Dhingra on Medium]]></description>
        <link>https://medium.com/@ryenadhingra?source=rss-6556a14e3a1f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a6j7Vatjg2Y23Aw2NNcMZA.jpeg</url>
            <title>Stories by Ryena Dhingra on Medium</title>
            <link>https://medium.com/@ryenadhingra?source=rss-6556a14e3a1f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 01:19:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ryenadhingra/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[10 Hidden Details you Probably Missed at Delhi’s Red Fort]]></title>
            <link>https://medium.com/@ryenadhingra/10-hidden-details-you-probably-missed-at-delhis-red-fort-c775429058e9?source=rss-6556a14e3a1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c775429058e9</guid>
            <category><![CDATA[world]]></category>
            <category><![CDATA[history]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[photography]]></category>
            <dc:creator><![CDATA[Ryena Dhingra]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 17:36:38 GMT</pubDate>
            <atom:updated>2026-10-07T12:24:30.349Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4tpuGlElhC4JPnyP253aA.jpeg" /><figcaption>Naqsha-i-Lahiri Darwaja, Quila Mubarak (Company Painting), Source: DAG</figcaption></figure><p>In the 378 years it has been standing, the iconic Red Fort at Delhi has witnessed all flavours of historical drama, ranging from courtly Mughal culture and powerful militaries to betrayals, bloody wars of succession and a tragic end to a long-lived dynasty. When Shah Jahan shifted his capital from Agra to Delhi, he decided to build the city of Shahjahanabad, which we now know as Purani Dilli.</p><p>The city was built to resemble the shape of a crescent and was surrounded by walls and 14 gates. 4 of these gates, namely Delhi gate, Ajmeri gate, Turkman gate and Kashmere gate, still survive today. At the focus of this crescent was the Red Fort or the Qila-e-Mubarak as it was known then. Two main streets intersected in front of the Qila: the North-South running Faiz Bazaar street that separates Daryanganj and the Fort from the rest of Old Delhi and the East-West running Chandni Chowk connecting the Lal Qila to the Fatehpuri Masjid.</p><p>If you have been here or are acquainted with its history, you already know what an inspiration the Red Fort is for the imagination. In this medium story, we are going to look a little beyond the surface to talk about some details inside the Fort that most people miss and hence, are ‘hidden!’</p><blockquote><strong>1. The Lahori Gate</strong></blockquote><p>Right after you grab your ticket from the counter and make it past security, you are greeted by the majestic entrance to the focal point of Shah Jahan’s city. What’s the hidden detail here, you may ask? This gate was not part of the Qila when it was originally built by Shah Jahan in 1648. Instead, it was a later addition by his son, Aurangzeb, who built a barbican to better protect the fort from enemy forces. A barbican is a fortified outpost built over a gate of a castle or city. The idea behind this was to defer invading armies by forcing them to make a complete right angle turn. However, this decision was criticised by Shah Jahan, who had been put under house arrest by then at the order of Aurangzeb. He called the new gate a ‘veil on a beautiful bride.’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*7P0mFRQ1DB6Blb8bv35Abw.jpeg" /><figcaption>Painting of Lahori gate by Ghulam Ali Khan, 1852–4, Source: Wikipedia</figcaption></figure><p>On either sides of the gate, you can notice the moat that runs along the ramparts and bastions of the Qila. While today grass has claimed most of the space inside, it was originally fed by the waters of the Yamuna and added to the defence of the Fort. It is easy to understand why the former Mughal emperor felt unhappy with his son’s decision to build a barbican, especially since he had intended the entrance of his grand Fort to be the starting point of the Chandni Chowk street. As you enter and look to your left, you are met with the grandeur of Shah Jahan’s original entrance known as the Lahori Gate, called so because it faces the city of Lahore in present-day Pakistan. Congratulations! You’ve made your grand entrance, albeit on foot rather than atop elaborately decorated elephants.</p><blockquote><strong>2. The Orpheus Panel</strong></blockquote><p>The Lahori Gate leads to the Chhata Chowk which used to be a unique covered bazaar in a time when markets were typically open-air. Where today you find shops selling souvenirs, there used to be local as well as foreign traders selling exquisite textiles and precious gems. These traders used to live in apartments right above the shops. Right after exiting the Chhata Chowk, you can spot the Naubat Khana or the Drum House. Musicians were seated at the arches of this structure to play music to greet incoming people. Apartments also exist on the first floor of the Drum House but they are not open for visitors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lyDe5DfaPIkC_AFRjmzpOg.jpeg" /><figcaption>Drum House or Naubat Khana</figcaption></figure><p>Through the Drum House, visitors would make way to the Diwan-e-Aam or the Hall of Public Audience. This is where the Emperor held his court for day-to-day proceedings. Today, the Diwan-e-Aam is a small structure but in its prime, a massive forecourt used to extend it all the way to the Drum House. The enclosed forecourt was demolished by the British after the Uprising of 1857 to be replaced by the green park you see today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*fJOia_l0IvV_Fuuy-qIq-w.jpeg" /><figcaption>Diwan-e-Aam</figcaption></figure><p>Once you climb the stairs up the Diwan-e-Aam, you see a mostly empty imperial court far from its documented glory. The things you can’t see, imagination must fill in. Imagine the floors covered with Persian carpets, pillars wrapped in brocade, ceilings adorned with embroidered canopies and nobles wearing soft silks and glittery jewellery. The raised marble throne sits in stark contrast with the rest of the hall. This is here where our next ‘hidden’ detail is!</p><p>Human images are generally not depicted in Islamic art to respect the belief that creating life is the exclusive power of God. Yet within the Red Fort, there is one place where human life has been captured in exquisite marble inlay. Directly beneath the canopy of the throne at Diwan-e-Aam is a panel depicting the Greek hero Orpheus playing the lyre, surrounded by animals enchanted by his music. How exactly this panel came to be a part of Red Fort remains unclear. Some believe that it was commissioned by Shah Jahan to represent his idea of universal harmony while others say it was a luxury import from Florence. Whatever may the story be, it is remarkable to see something so out of place blend in with its surroundings so well!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6F9Lpi0smQE-rQTNwhcK9A.jpeg" /><figcaption>Orpheus Panel Behind the Canopy of the Emperor’s Throne</figcaption></figure><blockquote><strong>3. Rings for Holding up Tents</strong></blockquote><p>Climb down the stairs on the other side of the Diwan-e-Aam and look up. You will see huge metal rings lined near the ceiling. Anybody who does not already know about this detail is sure to miss it! These rings were used to hold up tents or shamianas around important buildings in the Qila. In fact, you will notice these rings on a number of structures as you walk around.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bpy-yV3oEEsOqriPmQhoqg.jpeg" /><figcaption>Rings for Shamianas</figcaption></figure><p>At the rear side of the Diwan-e-Aam is an apartment. The back wall of this apartment has a gate through which the emperor could enter the hall in the front to sit at his throne. Right behind the hall and just across a water body with a fountain in the middle, sits the Rang Mahal where the women from the imperial harem would rejoice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VTtTuRJPX_jL5DOsV9RK0Q.jpeg" /><figcaption>Apartment on the Backside of Diwan-e-Aam</figcaption></figure><blockquote><strong>4. Stream of Paradise</strong></blockquote><p>The Rang Mahal stands atop a raised terrace along the back wall of the Fort. Right along the length of this space, runs an empty canal from North to South. This was called the Nahir-e-Bahisht, literally the ‘Stream of Paradise.’ It drew water from the Yamuna and ran through the private quarters inside the seraglio of the Qila, serving as a natural air conditioning system to cool down the royal chambers during months of intense heat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H10FOLU1fM_Ya7iBat9ZPQ.jpeg" /><figcaption>Rang Mahal</figcaption></figure><p>An interesting feature is the flower-shaped fountain basin in the middle of the water canal at the Rang Mahal which would have collected the cool water running down the stream.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*-oPbxiplF_3KivKyd06vJQ.jpeg" /><figcaption>Water Canal Inside Rang Mahal</figcaption></figure><p>The canal originates at the Shah Burj and runs through all the structures, Khas Mahal, Diwan-e-Khas and Hammam, on the terrace. At the Diwan-e-Khas, however, it cannot be seen because it runs under the floor in the central bay of the pavilion where the emperor’s peacock throne would have been kept. Once you get to the end of the terrace towards the North-Eastern end of the Fort, you can notice a tilted marble cascade at the three-storied Shah Burj or King’s Tower. This is where water used to enter into the stream using a unique siphon system that was engineered to pull water from the Yamuna. The Shah Burj has suffered significant damage including the loss of its domed Chhatri.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wySA5QRp5LnGAbKY7Whigw.png" /><figcaption>Shah Burj Then vs Now; The Origin of the Canal from the Tilted Cascade</figcaption></figure><blockquote><strong>5. Underground Rooms at Rang Mahal</strong></blockquote><p>While you are still at Rang Mahal, noticed the jalis or screens right under the terrace floor. If you squint your eyes and peep though these jalis, you will notice that the Mahal houses a basement. This is also quite obvious from the steps that lead down to the Tehkhana towards the Northern wall of the structure. The Tehkhana used to be a cool basement where the ladies of the Mahal could retreat during the summer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5rouAyxhiuNSN49lekaqUg.jpeg" /><figcaption>Underground Tehkhana at Rang Mahal</figcaption></figure><blockquote><strong>6. The Emperor’s Private Entrance to the Fort</strong></blockquote><p>To the left of the Rang Mahal lies the Khas Mahal which used to be the personal living quarters of the Emperor. An octagonal tower projects outwards on the backside of the Fort from the Khas Mahal. It was a daily ritual for the Emperor to present himself before his subjects every morning from this balcony. King George V and Queen Mary famously appeared before the public from this tower during the Delhi Durbar of 1911, held to celebrate their coronation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*iPLO6Bj0XruA-NR-HiGwvw.jpeg" /><figcaption>King George V and Queen Mary from the Balcony of Khas Mahal</figcaption></figure><p>Below the viewing balcony used to be the Khizri Gate, also known as the River Gate, which was reserved for the Emperor’s use. The remnants of this gate obviously cannot be seen from inside the Fort but the stairs decending to the River Gate still exist on the Western wall of the Khas Mahal. This is the gate that Shah Jahan used in 1648 to enter into the Qila for the first time after its completion. Ironically, the same gate was used by the last Mughal Emperor, Bahadur Shah Zafar, to exit the Fort when he was sentenced to exile in Rangoon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*FBndmQavwn8d9mChsMt-6A.png" /><figcaption>River Gate Beneath Khas Mahal 1842 (Painting by Ghulam Ali Khan)</figcaption></figure><blockquote><strong>7. ‘Agar Firdaus’ Verse</strong></blockquote><p>As you walk further, the next structure you encounter is the Diwan-e-Khas or the Hall of Private Audience. This is where the famous Peacock Throne was kept and where the Emperor met his most trusted and important nobles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9e-PObGxSdfMyEyCJd8HCg.jpeg" /><figcaption>Diwan-e-Khas and Khas Mahal</figcaption></figure><p>The rings for holding up shamianas, which we talked about earlier, can also be seen below the roof of this massive hall. Remnants of intricate Pietra-Dura carvings and an elaborately decorated ceiling can still be seen. My favourite detail in the Diwan-e-Khas, however, is the ‘Agar Firdaus’ verse inscribed on the Northern and Southern inner corner arches. The famous Persian couplet goes as follows.</p><p><em>“Agar firdaus bar ru-ye zamin ast, hamin ast-o hamin ast-o hamin ast”</em></p><p><em>(“If there is a paradise on earth, it is this, it is this, it is this”)</em></p><p>It is widely attributed to have been composed by Amir Khusrau in praise of Kashmir. However, Rana Safvi, in her book ‘The Living City of Shahjahanabad,’ highlights that the verse was likely penned by Shah Jahan’s wazir to appreciate the newly constructed Qila.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ghkQAz2z5FThgoAqpMdxIQ.jpeg" /><figcaption>Agar Firdaus Verse</figcaption></figure><blockquote><strong>8. Moti Masjid</strong></blockquote><p>The Hammam or the Bathhouse which stands right next to the Diwan-e-Khas is my favourite structure inside the Red Fort but that is not where our next ‘hidden’ detail will be found. Turn your back towards the Hammam to face the iconic copper-plated gate of the Moti Masjid and look upwards at its ornamental minarets. Observe the minarets on the left and the right carefully. You will notice that the ones on the left appear closer to the outer compound wall whereas the ones on the right are situated farther.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a_hNqxOObEiEHSpnut9r_g.jpeg" /><figcaption>Moti Masjid’s Plan</figcaption></figure><p>To understand why, we must remember that Moti Masjid was not part of the Fort’s original architecture. It was built later by Aurangzeb who faced the challenge of ensuring that the mosque remained aligned with the Fort’s buildings while also being correctly oriented towards Mecca. The solution was to have a double-walled enclosure where the outer wall remained aligned with the Fort’s existing plan while the inner wall made sure that the compound faced Mecca.</p><blockquote><strong>9. Baoli</strong></blockquote><p>Most people do not complete the walk around Red Fort and, hence, are not aware of the Baoli or Stepwell that exists within the Qila. If you take the path from Shah Burj, past the Canteen and the Gate leading to the ruins of Salimgarh Fort, you will come across the Fort’s Baoli which was where water was harvested and gossip was passed around. Baolis were important places for social and cultural gatherings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*-9JN5Pyq9tZLu7XXp0FGvg.jpeg" /><figcaption>Baoli at Red Fort</figcaption></figure><blockquote><strong>10. Empty Spaces</strong></blockquote><p>It is difficult to understand how the Red Fort once functioned by looking only at the buildings that stand individually today. The original Red Fort was starkly different from what remains of it. It did not have the vast amount of empty spaces you can see today. Raised walkways and arched corridors once connected its various buildings, creating a continuous and interconnected palace complex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*e6KOYMXBk-I-EjOmcXkH9Q.jpeg" /><figcaption>Red Fort Before 1857</figcaption></figure><p>Much of this architecture was destroyed by the British after the events of 1857. The losses included the forecourt outside the Chhata Chowk and in front of the Naqqar Khana, the apartments flanking the Diwan-e-Aam, the garden pavilions and the forecourts of the two halls of audience. In fact, nearly 80 percent of the buildings within the Fort’s walls were demolished to make way for British barracks for housing soldiers.</p><p>When you visit the Red Fort, it is worth keeping these losses in mind. Look beyond the buildings that survive today and try to imagine the palace complex in its original grandeur. What a sight it must have been!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c775429058e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Brief History of Punched Cards: The Era of Programming on Paper]]></title>
            <link>https://medium.com/@ryenadhingra/a-brief-history-of-punched-cards-the-era-of-programming-on-paper-c44e86a3da35?source=rss-6556a14e3a1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c44e86a3da35</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Ryena Dhingra]]></dc:creator>
            <pubDate>Sun, 10 Aug 2025 18:13:34 GMT</pubDate>
            <atom:updated>2025-08-10T18:48:11.622Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fAH4ph-rdY1A5-_52xhYw.jpeg" /><figcaption><a href="https://commons.wikimedia.org/wiki/File:Margaret_Hamilton_-_restoration.jpg">Margaret Hamilton (Draper Laboratory; restored by Adam Cuerden, edited by author, 1969, PD-US)</a></figcaption></figure><p>This is Margaret Hamilton, a lead computer scientist at NASA during the 60’s, and next to her is the pile of code, typed by hand on paper, that landed the first humans on the moon as part of the Apollo Space Program. While multiple remarkable stories are wrapped up in this single sentence, a question that might stand out is ‘Why was this code written on paper?’ To answer this we must trace the origins of programming and go back roughly 60 years to an era when computing did not exist as we know it today.</p><p>Early computers like ENIAC (1945), UNIVAC 1 (1951), IBM 1401 (1959) did not have keyboards to input code or screens to view output. These are components that are now taken for granted in any programming environment but were developed much later than when we began programming computers. One must wonder how computers were fed code back then. The answer lies in the image attached below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XUB8BR4mGQKtmiFsZt4_1w.jpeg" /><figcaption><a href="https://commons.wikimedia.org/wiki/File:FortranCardPROJ039.agr.jpg">Fortran punch card (Arnold Reinhold, 2006, CC BY-SA 2.5)</a></figcaption></figure><p>This is a punched card, made of paper. The one shown here is a standard IBM card with 80 columns and 12 rows. Each column represents one character and that character is determined by the specific pattern of holes punched in that column. When put into a card reader, the machine could understand what the card said by shining light over it. If a hole was encountered, light would pass through it, triggering the photoelectric sensors on the other side and thus passing the information to the computer as electrical signals. Common languages used during the punched card era were COBOL, ALGOL and Assembly Languages. The card shown here has a Fortran statement punched onto it.</p><p>Think of punched cards as a physical medium to store data and program before magnetic tapes and disks took over. These had to be fed to the computer as input and the tasks were performed in strict sequence, with each card representing a specific instruction or piece of data. This meant that each card stored one line of code from the program.</p><p>Let me help you visualise the huge number of cards a typical program would require. A single simulation program run by Margaret Hamilton’s team for testing spacecraft systems might require around 5,000–8,000 lines of code for the program and around 10,000 more for the data to be processed by the program. This would require 15,000–20,000 punched cards for a single simulation!</p><p>Also, since these cards had to be fed into the card reader in a strict order, imagine the catastrophe should a programmer drop his bundle of cards! To prevent this from happening, programmers would often number their cards or tip the cards to draw a slant line, as shown in the picture below, so they could be rearranged if an unfortunate disaster were to occur. Some cards, like the one having the Fortran statement above, were also numbered by punching holes on the right side of the card, so they could be sorted later by a card sorter machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rw22Amb5WPnSI9PgZ0eKjg.jpeg" /><figcaption><a href="https://commons.wikimedia.org/wiki/File:Punched_card_program_deck.agr.jpg">Punched card program deck (Arnold Reinhold, 2006, CC BY-SA 3.0)</a></figcaption></figure><p>I’ll show you how to read a punched card later in this blog.</p><h4><strong>Tracing the Origins of Punched Cards</strong></h4><p>Quite interestingly, punched cards have their origins in the textile industry. Their design was inspired by the Jacquard Loom which used stiff cards with holes in them to control the pattern that was to be weaved onto the cloth.</p><p>This inspiration led Herman Hollerith to conceive the idea of punched cards which he invented to record the data of individuals during the 1890 United States census. The data from the punched cards was analysed by an electro-mechanical tabulator (note that it was not a computer) which was also devised by Hollerith. Hollerith’s invention reduced the duration of the census from 7 years to 2 years.</p><p>Hollerith founded the Tabulating Machine Company in 1896 to commercialise his invention. The company sold punch machines and tabulators. In 1911, the company merged with the Computing Scale Company of America and the International Time Recording Company to form what would later be known as International Business Machines (IBM).</p><h4><strong>Why Were They Needed?</strong></h4><p>The two main applications of punched cards were in</p><ol><li>Business, for maintaining records and processing data</li><li>In Computer Science, as input and storage medium for programs and data required for programs</li></ol><p>Before the integration of computers and punched cards, payroll processing, inventory management, billing and invoicing, record maintenance, insurance and banking were all done manually by people or by tabulators like the one Hollerith had invented. It was at this point in history that the gap between mechanical and digital computing was bridged. Punched cards became widely used for storing and analysing data within businesses. By the 1950’s, punched cards had made their way into the world of Computer Science by becoming the main medium used for programming.</p><h4><strong>How Do You Read a Punched Card?</strong></h4><p>Let us go back to the punched card that we saw at the beginning of this blog. We can make out that each column has been encoded to represent a character. The encoding method used for this particular card is called Hollerith Encoding (named after the same Hollerith mentioned earlier).</p><p>The card has 80 columns and 12 rows and each column equals one character. The Fortran statement has been typed on the top for the ease of the programmer. Notice how each column has a maximum of 3 punches. Let us refer to this table to learn how Hollerith Encoding was performed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lVCy-DGclt_Kt1Kdsjf8bw.png" /><figcaption><a href="https://www.youtube.com/watch?v=0065zKzeCWI&amp;t=1s">IBM Punched Cards Explained — Video 207 (Anthony Francis-Jones, YouTube)</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XUB8BR4mGQKtmiFsZt4_1w.jpeg" /><figcaption><a href="https://commons.wikimedia.org/wiki/File:FortranCardPROJ039.agr.jpg">Fortran punch card (Arnold Reinhold, 2006, CC BY-SA 2.5)</a></figcaption></figure><p>The top three rows, 12, 11 and 0, act as the zone punches. They divide the entire set of characters into 4 zones (when 12 is punched, when 11 is punched, when 0 is punched and when no zone punch row is punched). This allows the rows 1–9 to represent a different set of characters depending on what zone the given column is in. For instance, in the card shown here, for the first character ‘Z’, a combination of 0 and 9 is punched. You can match this with the table. For the next character ‘(’, the zone punch is 11 and additionally, rows 5 and 8 have been punched. See the table.</p><p>Every column can have a minimum of 1 punch and a maximum of 3 punches. Thus, Hollerith Encoding provided an efficient encoding method and also ensured that the paper wasn’t made flimsy or difficult to read by making too many punches. A common saying during this time was ‘do not fold, spindle or mutilate’ as that could damage the cards!</p><h4>Understanding the Setup and the Workflow</h4><p>During the era that we have stepped into, computers didn’t occupy just a quarter of your desk. Instead there were entire rooms dedicated to the setup. Remarkably, these setups weren’t just single computers but entire ecosystems of machines and workstations. So far, we have understood that programmers couldn’t simply write their code into the computer and wait for the output. Let us now also understand the workflow of how all this happened.</p><p>A programmer would typically begin writing the code on special paper forms called coding forms. This code was now needed to be punched onto a deck of cards line-by-line. This was done with the help of a typewriter-like machine called a keypunch. Each key on the keyboard of the keypunch represented an alphabet, number or special character. When a key was pressed, the pattern of holes corresponding to that character would be punched onto a given column. A widely used keypunch was the IBM 029 Punch Machine which has been shown below. The Fortran statement card shown earlier was also punched using this keypunch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s9oOrgL4eXMF1AOreKOoTQ.jpeg" /><figcaption><a href="https://commons.wikimedia.org/wiki/File:IBM_card_punch_029.JPG">IBM card punch station 029 (waelder, 2007, CC BY-SA 3.0)</a></figcaption></figure><p>The next step involved feeding the deck of cards into a card reader. It was an input device that enabled the mainframe computer to read the program and the input. If the keypunch was the keyboard, the card reader was the USB port of the punched card era! The card reader would pass the deck of cards one-by-one through the reading mechanism discussed earlier and convert the hole patterns into electrical signals that the computer could process.</p><p>This was followed by a mainframe computer like the IBM 1401. Once the card reader fed the deck into the mainframe’s memory, the CPU would begin executing instructions from the punched cards. The program could analyse datasets, perform calculations or control machinery in specialised systems.</p><p>The result was usually printed onto paper using a line printer like the one shown below. In some computers, the result could also be punched onto new cards using a card punch connected to the mainframe. These output cards could then be used as input for some other program.</p><p>Because batch processing was done, any error produced during the compilation was revealed at the end of the loop. Since there was no editing inside the computer, each fix meant replacing the faulty card with a newly punched one. After that, the entire process had to be done again.</p><h4>A Remarkable End</h4><p>I hope you have now found the answer to the question I proposed at the beginning of this blog, ‘Why was the code for the Apollo Space Program written on paper?’ Margaret Hamilton’s team worked with the custom-built Apollo Guidance Computer (AGC) on which programs were written in the AGC Assembly Language. Punched cards were likely used as the main input medium for ground operations!</p><p>Gradually, punched cards went into oblivion as they were replaced by magnetic tapes and disks which offered higher storage capacity, faster access and easier editing. Nonetheless, it is extremely fascinating to understand their working and contribution to modern day programming.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c44e86a3da35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The World of Number Systems: Why Computers Count Differently]]></title>
            <link>https://medium.com/@ryenadhingra/the-world-of-number-systems-why-computers-count-differently-8b041c91e5fd?source=rss-6556a14e3a1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b041c91e5fd</guid>
            <category><![CDATA[computers]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[engineer]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Ryena Dhingra]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 12:10:57 GMT</pubDate>
            <atom:updated>2025-07-13T06:06:42.543Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rwGX_AKu6zwMeT_k" /><figcaption>Photo by <a href="https://unsplash.com/@eva_gorobets_?utm_source=medium&amp;utm_medium=referral">Eva Gorobets</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We encounter the digits 0 to 9 in all aspects of our lives. From counting the number of items in your grocery list to making a deposit at the bank, we understand the significance of these ten digits naturally. But have you ever wondered why we begin from 0 and stop at 9, and why we need to add another digit to count higher than 9? This is because we use the decimal (base-10) system to represent numbers. To understand the working of the decimal system, we must understand the meaning of <em>base</em>.</p><h4>Decimal System</h4><p>The base or the radix of the decimal system is 10. This implies that the number of distinct digits in the number system is also 10, namely 0 to 9. Additionally, each position from right to left is assigned a weight that is an increasing power of 10. The place value of any digit can be found by multiplying the digit with the weight corresponding to its position. The same has been illustrated with the help of an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*126MbsFQ1KsEeCC7hemhEw.png" /><figcaption>Decimal Representation</figcaption></figure><p>However, to an entity such as a computer, the number ‘10’ may not mean anything specific. ‘10’ can have any meaning that we set. It could represent some other number in an alternative numbering system. We can use this knowledge to establish that 0 to 9 isn’t something that is universal or natural–it is a choice or a language employed to represent some abstract mathematical quantity. By this logic, innumerable number systems with varying bases are possible.</p><p>Positional number systems have been in use for centuries. While the decimal system is directly derived from the Hindu-Arabic numeral system, other civilizations had their own versions of radix-based positional number systems. The Babylonians, for example, used a base-60 (sexagesimal) system. As a matter of fact, the system has deeply influenced the way we calculate angles and time. 1 hour = 60 minutes; 1 minute = 60 seconds. You’re doing base-60 arithmetic every time you calculate how long 1 hour 45 minutes plus 30 minutes is!</p><p>Funnily enough, you use non-decimal numbering systems more times in your day-to-day life than you may realise. Estimating how many dozens of eggs you need to buy to get through the week makes use of a base-12 system. In music theory, having 12 semitones in an octave is again a base-12 concept. Calendars employ a mixed-radix (base-7, base-12, base-30/31) system. The point to be drawn from these examples is that a number system is a language that we design and subsequently, use to our convenience.</p><p><strong>The four most popular positional number systems that we use are:</strong></p><ol><li>Decimal System (base-10)</li><li>Binary System (base-2)</li><li>Octal System (base-8)</li><li>Hexadecimal system (base-16)</li></ol><h4>Binary System</h4><p>This is a base-2 system. The two implications that we draw from this statement are that firstly, the number of digits we work with is 2, namely 0 and 1, and secondly, the weights corresponding to each position from right to left is an increasing power of 2. For example, the decimal equivalent of the binary number 110010 is 50. This can be calculated as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*gpNBwi1wMIrAT2DE6edtyA.png" /><figcaption>Binary to Decimal Conversion</figcaption></figure><p>Each digit in binary is called a bit. We know that a bit may be either 0 or 1. A combination of 8 sequential bits is called a byte. In a digital computer, a byte is capable of representing values ranging from 00000000 to 11111111 (0 to 255). This knowledge will be useful when we learn about why computers work on the binary system.</p><h4>Octal and Hexadecimal Systems</h4><p>These are base-8 and base-16 systems respectively that work in a similar manner. The 16 distinct digits used in the hexadecimal system are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F where A, B, C, D, E and F have the decimal equivalents 10, 11, 12, 13, 14 and 15. These representations become extremely useful when programmers need to keep track of long, cumbersome binary numbers used in computers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*pUJ-lAmILRtcnJSPxcVLBQ.png" /><figcaption>Hexadecimal to Decimal Conversion</figcaption></figure><p>Now that we have successfully established that different number systems are just ways of writing or representing the same set of numerical figures, we can move on to the discussion of why computers use binary instead of decimal or any other digits.</p><h3>Why Computers Use Binary</h3><p>While a binary view of the world may seem overly simplistic for humans, for computers it’s both elegant and highly effective. We are talking about reducing the complexity of reality into just two states: good or bad… true or false… on or off… 0 or 1.</p><p>Most people know that binary is something that computers work on. However, they often don’t understand its relevance. It is pertinent to note that the use of binary in digital systems is not inherent but rather the result of practical engineering choices and key aspects in hardware design.</p><h4>Hardware Design Considerations</h4><p>To understand this in detail, let’s talk about the most fundamental unit of any computer–the transistor.</p><p>A transistor is a semiconductor device that, in most simple terms, acts as a switch. The two possible states for a transistor can be ON or OFF, ON being when it allows electricity to pass through and OFF when it does not. These two states can be easily represented by the binary digits 0 (for OFF) and 1 (for ON).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Dfcs2GTUkR5L3_H8" /><figcaption>Photo by <a href="https://unsplash.com/@trisolarian?utm_source=medium&amp;utm_medium=referral">Axel Richter</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The reason why transistors are so fundamentally important for building any kind of digital system is because of their ability to form much more complex circuits. All basic logic gates like NOT, AND, OR can be made by the combination of more than one transistors in varied configurations.</p><p>These logic gates, in turn, are used to build more advanced combinational and sequential circuits like adders, decoders or flip-flops. These act as building blocks in the construction of the central processing unit and memory–the two most important parts in any computer. So, the hardware design of a computer fundamentally relies on transistors, whose ability to act as on-and-off switches makes all digital computation possible.</p><p>Building on that, binary becomes the natural choice for hardware implementation. Transistors inherently operate in two discrete states and this perfectly aligns with the binary number system.</p><h4>Reliability</h4><p>So far we have established that binary electronics either have a current or they do not. This is represented well by the digits 0 and 1. The two states are well separated in voltage (for example, 0V for 0 and 5V for 1). We can also introduce a threshold value, say 2.5V, such that all voltages lying between 0V and 2.5V are classified as 0 and the ones above 2.5V are interpreted as 1.</p><p>This ensures that electrical noise, signal degradation over long distances or instabilities in supply voltage do not disrupt the inherent logic of the circuit. For instance, even if 0V rises to 0.5V and 5V falls to 4.5V, due any of these reasons, the circuit would still intercept the former as logic 0 and the latter as logic 1. Hence we can say that binary in digital electronics minimises error and is extremely reliable.</p><p>To strengthen our point, let us take an example of a base-3 system being used for circuit building. Such a logic would require our system to be in 3 discrete states (say, 0, 1 and 2) where each state would correspond to a set voltage. The voltage through any given component would determine its state.</p><p>However, this introduces significant practical challenges. Accurately distinguishing between three voltage levels (say, 0V, 2.5V, and 5V) requires extremely precise control over the voltage being supplied and detected. Even minor electrical noise or fluctuations could cause a signal meant to be interpreted as ‘1’ (2.5V) to be misread as either ‘0’ or ‘2’.</p><p>Unlike binary, where there is a wide and clearly defined margin between ‘0’ and ‘1’, ternary systems operate with narrower voltage bands, making them much more vulnerable to signal degradation and noise.</p><h4>Simplicity</h4><p>The 0 and 1 of binary are essentially the same as the <em>true </em>and <em>false </em>of Boolean logic. Boolean arithmetic is directly applicable on the binary system.</p><p>Another significant upside to the use of binary is in its ease of storage. In early computers, punch cards used the presence or absence of a hole to represent binary values, with a punched hole indicating a 1 and no hole indicating a 0.</p><p>This concept carried forward into modern forms of storage. In hard disks, magnetic domains are oriented in different directions — north for 1, south for 0. CDs and DVDs use tiny pits and lands on their surface. A laser reflects differently off these physical changes, translating them into binary data. In solid-state drives (SSDs), the charge level in a memory cell determines the bit–a highly charged cell stores a 1, and a discharged one stores a 0. Similarly, in RAM, each bit is held in a tiny capacitor that is either charged (1) or not (0).</p><p>Because binary only needs to differentiate between two stable states, it allows for data to be stored with high reliability and minimal risk of error, even as storage technologies have evolved over time.</p><h4>Conclusion</h4><p>From the decimal numbers we use in everyday life to the binary digits that govern the world of computing, number systems are ultimately human-made tools. They are languages designed to represent abstract quantities in practical ways.</p><p>While countless number systems are possible, binary has emerged as the most effective for digital systems. It’s not just a convention; it’s a logical consequence of choosing the most robust way to design digital systems.</p><p>Understanding this not only explains why computers use 0s and 1s, but also shows how simple math works hand-in-hand with practical engineering to make modern computers possible.</p><p>I’d like to draw an end to this blog by quoting something I saw on a TED-Ed episode, titled ‘How exactly does binary code work?’ recently.</p><p><em>There are 10 types of people in the world: those who understand binary and those who don’t.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b041c91e5fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>