<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lilia Khachatryan</title>
    <description>The latest articles on DEV Community by Lilia Khachatryan (@lilia).</description>
    <link>https://dev.to/lilia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1160482%2Fecc4f4c6-504c-4a35-aa10-b23208c22765.png</url>
      <title>DEV Community: Lilia Khachatryan</title>
      <link>https://dev.to/lilia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lilia"/>
    <language>en</language>
    <item>
      <title>What is Java? OOP (4 pillars): Primitive and Non-Primitive Types in java.</title>
      <dc:creator>Lilia Khachatryan</dc:creator>
      <pubDate>Wed, 29 Nov 2023 20:39:14 +0000</pubDate>
      <link>https://dev.to/lilia/what-is-java-oop-4-pillars-primitive-and-non-primitive-types-in-java-3con</link>
      <guid>https://dev.to/lilia/what-is-java-oop-4-pillars-primitive-and-non-primitive-types-in-java-3con</guid>
      <description>&lt;p&gt;Java is a versatile programming language with widespread applications in crafting Android apps, web applications, and various software development tools. At its core, Java embraces the principles of Object-Oriented Programming (OOP), characterized by four foundational pillars: Abstraction, Polymorphism, Encapsulation, and Inheritance.&lt;br&gt;
&lt;strong&gt;Abstraction&lt;/strong&gt;-involves simplifying complex systems by modeling classes based on the essential properties, shortly said it shows required information and ignores unnecessary details.&lt;br&gt;
&lt;strong&gt;Polymorphism&lt;/strong&gt;-means "many forms", it allows objects of different classes to be treated as objects of a common-based class. &lt;br&gt;
&lt;strong&gt;Encapsulation&lt;/strong&gt;-restricts access to some of an object’s components and prevents accidental data modification.&lt;br&gt;
&lt;strong&gt;Inheritance&lt;/strong&gt;-is a mechanism that allows a new class to inherit the properties and behaviors of an existing class. &lt;br&gt;
In data types, Java encompasses two tracks: &lt;strong&gt;Primitive and Non-primitive&lt;/strong&gt;. Primitive types, including int, byte, short, long, float, double, boolean, and char, represent the fundamental building blocks of the language. On the other hand, Non-primitive data types, often termed reference types, point to objects and are crafted by the programmer. These non-primitive types encompass Array, Class, String, and "Interface," contributing to the language's adaptability and extensibility.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding Binary numbers: Binary representation: 2-based system~10-based system.</title>
      <dc:creator>Lilia Khachatryan</dc:creator>
      <pubDate>Wed, 13 Sep 2023 18:01:34 +0000</pubDate>
      <link>https://dev.to/lilia/understanding-binary-numbers-binary-representation-2-based-system10-based-system-291b</link>
      <guid>https://dev.to/lilia/understanding-binary-numbers-binary-representation-2-based-system10-based-system-291b</guid>
      <description>&lt;p&gt;Hello world!&lt;/p&gt;

&lt;p&gt;I'm Lilia living on another planet full of adventures and fantasies. While living on Earth I believe that there are 10 digits because we have 10 fingers, therefore we can count all single digits from 0-9. And after 9 why do we write 10?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Similarity 1&lt;/strong&gt;: Here 1 in 10 represents how many times we use all our fingers in the example of 21 we use them twice and so on. The same happens on the planet where I used to live, but because here all creatures have 2 fingers they use only 0s and 1s to count. 0=0, 1=1, 2=10 ( here again 1 represents the time they use their fingers), 3=11... and how to represent 300 in a two-based system. Every time we need to divide it by 2 and write the remainder, the same process with the quotient till the quotient will be 1. So the 300 in 10 based system will be equal to 100101100 in 2 based system. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Similarity 2&lt;/strong&gt;: The formula (base)^n-1 represents the greatest number, where n is the number of digits. In a 10-based system, 9 is the biggest digit 99 is the biggest 2-digit number .... each of them can be represented as 10^n -1. The same is true for numbers in two-based systems 1, 11, 111.... the formula is 2^n -1 which gives the value of these numbers in 10 based system. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Similarity 3&lt;/strong&gt;: We can do the same operations ( sum, difference, multiplication, division)in a two-based system as we used to in decimal (10-based system) ones.&lt;br&gt;
&lt;em&gt;1. Addition (+)&lt;/em&gt;&lt;br&gt;
   We have 2 numbers 15 and 4. &lt;br&gt;
   15+4=19 &lt;br&gt;
15 in 2 based system will be (1111)&lt;br&gt;
15:2=7( r.1)&lt;br&gt;
7:2=3(r.1)&lt;br&gt;
3:2=1(r.1)&lt;br&gt;
1:2=0(r.1)&lt;br&gt;
(Read the remainders from bottom to top)&lt;br&gt;
So 15 is 1111 in a two-based system&lt;br&gt;
4:2=2(r.0)&lt;br&gt;
2:2=1(r.0)&lt;br&gt;
1:2=0(r.1)&lt;br&gt;
|=&amp;gt;4(10)=100(2)&lt;br&gt;
(10). 15+4 &amp;lt;=&amp;gt; (2).      1111&lt;br&gt;
                        + 100&lt;br&gt;
                      ________&lt;br&gt;
                         10011&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. Subtraction (-)&lt;/em&gt;&lt;br&gt;
  We have two numbers 20 and 5.&lt;br&gt;
20:2=10( r.0)&lt;br&gt;&lt;br&gt;
10:2=5(r.0)&lt;br&gt;
5:2=2(r.1)&lt;br&gt;
2:2=1(r.0)&lt;br&gt;
1:2=0(r.1)&lt;br&gt;
(10) 20 &amp;lt;=&amp;gt; (2) 10100&lt;br&gt;
5:2=2(r.1)&lt;br&gt;
2:2=1(r.0)&lt;br&gt;
1:2=0(r.1)&lt;br&gt;
(10) 5 &amp;lt;=&amp;gt; (2) 101&lt;br&gt;
(10) 20-5=15 &amp;lt;=&amp;gt; (2)   10100&lt;br&gt;
                     -   101&lt;br&gt;
                     _______&lt;br&gt;
                        1111&lt;br&gt;
&lt;em&gt;3. Multiplication (*)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;(10) 20*5=100  &amp;lt;=&amp;gt; (2)  10100&lt;br&gt;
                       *  101&lt;br&gt;
                       ______&lt;br&gt;
                        10100&lt;br&gt;
                    +  00000&lt;br&gt;
                   +  10100&lt;br&gt;
                   __________&lt;br&gt;
                      1100100&lt;/p&gt;

&lt;p&gt;Checking:  1  1  0  0  1  0  0 &lt;br&gt;
          (6)(5)(4)(3)(2)(1)(0)&lt;/p&gt;

&lt;p&gt;(2^0)*0+(2^1)*0+(2^2)*1+(2^3)*0+(2^4)*0+(2^5)*1+(2^6)*1= 0+0+4+0+0+32+64= 100 &lt;/p&gt;

&lt;p&gt;I hope it was helpful:)&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
