<?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: Aleksandr</title>
    <description>The latest articles on DEV Community by Aleksandr (@sargsyan).</description>
    <link>https://dev.to/sargsyan</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%2F1160645%2F8dd2c12b-7534-4432-ae13-2d9afab42db9.png</url>
      <title>DEV Community: Aleksandr</title>
      <link>https://dev.to/sargsyan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sargsyan"/>
    <language>en</language>
    <item>
      <title>JAVA</title>
      <dc:creator>Aleksandr</dc:creator>
      <pubDate>Thu, 30 Nov 2023 05:35:40 +0000</pubDate>
      <link>https://dev.to/sargsyan/java-l2d</link>
      <guid>https://dev.to/sargsyan/java-l2d</guid>
      <description>&lt;p&gt;Types in Java&lt;/p&gt;

&lt;p&gt;There are various kinds in Java that help with data organisation and storage. Primitive types that hold fundamental data directly include integers (int), floating-point numbers (float), characters (char), and boolean values (boolean). Also , Java has non-primitive types like classes, interfaces, arrays, and enums, which enable the creation and use of more complex and unique data structures in programmes.&lt;/p&gt;

&lt;p&gt;The differences of primitive and non-primitive&lt;/p&gt;

&lt;p&gt;Java primitive types are simple data types such as integers (int), characters (char), floating-point numbers (float), and boolean values (boolean) that are used to store values directly. They are not objects; they contain basic info.&lt;/p&gt;

&lt;p&gt;However, complex data types in Java, such as classes, interfaces, arrays, and enums, are referred to as non-primitive types. Since they are pointers to objects, methods and other data can be stored in them. Non-primitive types can access methods and attributes and can be null, in contrast to primitive types.&lt;/p&gt;

&lt;p&gt;OOP&lt;/p&gt;

&lt;p&gt;OOP namely Object-Oriented Programming . It's a style of programming that groups code according to objects, which are just some of classes. Code that is reusable  may be created because objects have methods and  variables that interact with one another. OOP stresses ideas like encapsulation, inheritance, polymorphism, and abstraction to improve readability, flexibility, and maintenance of code.&lt;/p&gt;

&lt;p&gt;4 Pillars of OOP&lt;br&gt;
Four essential ideas are represented in object-oriented programming, or OOP. Encapsulation is the process of combining processes and data into objects to limit access and assure regulated interaction. Code reuse is encouraged by inheritance, which allows new classes to inherit traits from previous ones.  Through method overloading and overriding, polymorphism allows objects to be viewed as instances of their parent class, enabling flexible coding. In order to produce simple, intelligible models, abstraction concentrates on the most important elements while hiding intricate implementations. These ideas work together to create the basis of OOP, which encourages modular, reusable, and well-organized software development.&lt;/p&gt;

&lt;p&gt;))&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Binary numbers and Conversion</title>
      <dc:creator>Aleksandr</dc:creator>
      <pubDate>Wed, 13 Sep 2023 23:06:30 +0000</pubDate>
      <link>https://dev.to/sargsyan/binary-numbers-and-conversion-2949</link>
      <guid>https://dev.to/sargsyan/binary-numbers-and-conversion-2949</guid>
      <description>&lt;p&gt;In our days, modern computers use electricity to work and inside of the microchip electricity is turned either on or off. And so the on-s are represented by 1 and the off-s are respectively illustrated as the 0-s. These 1 and 0-s are the binaries which are also called base 2. Thus, let's understand from where those bases came from. So basically for us to understand what are the bases, we'll just start from base 10. Why? Because we can simply count from 1 up to 10 on our 10 fingers. This means the number of numbers/symbols are equal to the base number. Thus, we can come to the binary numbers, here we have 0 and 1 so this means that it's base 2. In base 10 numbers we count from 1 to 10 but in binary numbers we have a slightly different picture here. So lets start the count 0, 1, and... we don't have the two so in this case the 2 from base 10 can be displayed in base 2 form as 10(one zero). And after the 10 it's 11(one one). Why 11? Because here we have 10+1 which is equal to 11 where 10 is 2 and 1 is 1. After those examples you may ask, so how do I understand that 11 is three? Let's see. So here we need to count and assign the number of numbers, in this example we have only 2 numbers. When assigning the numbers we are starting from the right side to the left side and when counting them we always start from 0. so 1 from 11 is the 0th  and the other 1 is 1st. Here we have a function 2^n x m - &lt;br&gt;
where n is the  assigned number, the m is the value of number and the 2 is written there because binary numbers are base 2. So here we have 1 on the right side which is the 0th member so if we put this info into the function we'll get 2^0 x 1 = 1 and then we put the 1 on the left side and we'll get 2^1 x 1 = 2 so we basically converted  these numbers to base 10 and we can easily add 1 to 2 which is 3 (1+2=3) thus we know that 11 = 3. Let's take a look at a more complicated example. So there's 10101, so at first we  assign the numbers from right to left and then we do the addition. That is 2^4 x 1 + 2^3 x 0 + 2^2 x 1 + 2^1 x 0 + 2^0 x 1 = 16 + 4 + 2 = 22 we could actually  ignore the multiplications with 0 (because their multiplications with any number is always 0). So it turns out to be the vice versa version of the conversion so we can convert from the base 10(decimal) numbers into binary numbers. So we have a 55 which we need to divide by 2 every time till we get to the point that the remainder is less then 2. So the division will look like this 55/2=27+(1) 27/2=13+(1) 13/2=6+(1) 6/2=3+(0) 3/2=1+(1) and (1)-because its the remainder that is smaller than 2 we simply leave this remainder so lets combine all the remainders from the last remainder up to the first. It'll be 110111 so by those remainders we got the decimal number 55 as a binary number, thus 55(base 10)=110111(base 2).&lt;/p&gt;

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